From b549f4383452b2fa7f7b2d0fcee8559646395d56 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Sun, 21 Jun 2015 04:23:52 +0200 Subject: [PATCH] Fix search broken by port because returns are now different (gtk2->gtk3 and vte 0.36 -> 0.38) --- terminatorlib/searchbar.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/terminatorlib/searchbar.py b/terminatorlib/searchbar.py index 84c2ced2..d20c726f 100755 --- a/terminatorlib/searchbar.py +++ b/terminatorlib/searchbar.py @@ -3,7 +3,7 @@ # GPL v2 only """searchbar.py - classes necessary to provide a terminal search bar""" -from gi.repository import Gtk +from gi.repository import Gtk, Gdk from gi.repository import GObject import re @@ -137,6 +137,8 @@ class Searchbar(Gtk.HBox): self.searchrow+1, 0, self.search_character) + buffer = buffer[0] + buffer = buffer[:buffer.find('\n')] matches = self.searchre.search(buffer) if matches: self.search_hit(self.searchrow) @@ -158,6 +160,8 @@ class Searchbar(Gtk.HBox): self.searchrow+1, 0, self.search_character) + buffer = buffer[0] + buffer = buffer[:buffer.find('\n')] matches = self.searchre.search(buffer) if matches: self.search_hit(self.searchrow) @@ -172,7 +176,7 @@ class Searchbar(Gtk.HBox): self.next.show() self.prev.show() - def search_character(self, widget, col, row, junk): + def search_character(self, widget, col, row): """We have to have a callback for each character""" return(True)