After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 598045 - repeated Find Previous does not work
repeated Find Previous does not work
Status: RESOLVED FIXED
Product: gnote
Classification: Applications
Component: main
git master
Other Linux
: Normal minor
: ---
Assigned To: gnote-maint
gnote-maint
Depends on:
Blocks:
 
 
Reported: 2009-10-10 22:51 UTC by Iain Nicol
Modified: 2010-01-03 17:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (1.58 KB, patch)
2009-10-10 22:53 UTC, Iain Nicol
committed Details | Review

Description Iain Nicol 2009-10-10 22:51:50 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.
Comment 1 Iain Nicol 2009-10-10 22:53:57 UTC
Created attachment 145229 [details] [review]
proposed fix
Comment 2 Debarshi Ray 2010-01-03 17:03:12 UTC
Review of attachment 145229 [details] [review]:

Looks fine. Thanks.
Comment 3 Debarshi Ray 2010-01-03 17:03:29 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.