GNOME Bugzilla – Bug 598045
repeated Find Previous does not work
Last modified: 2010-01-03 17:03:29 UTC
This time the bug *is* a gnote bug ;). Open a note. Open the Find bar, and type in something that appears in the note multiple times. Click the find Previous button: this feature will not work more than once. Specifically: If you click Previous when there is no selection, Previous works. When text is selected manually before you click Previous, whether Previous works depends on whether the text was selected from right to left or instead from left to right. If text is already selected from clicking Previous before, clicking Previous again will not work. Technical details: A Gtk::TextBuffer selection is represented by two markers: a selection_bound mark and a insert mark. The crux is that these can be in any order. A patch is attached which takes this into account. The patch also changes the behaviour of find Next to be dual to the new behaviour of find Previous. Suppose you highlight a region, and click find Next. Without the patch, Next will accept a match inside the highlighted region. With the patch, the match must be strictly after the highlighted region (assuming no wrap-around). This new behaviour is the same as gedit's, and symmetric to the new find Previous.
Created attachment 145229 [details] [review] proposed fix
Review of attachment 145229 [details] [review]: Looks fine. Thanks.
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.