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 737750 - The searching by # and * work incorrectly
The searching by # and * work incorrectly
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: editor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-01 21:17 UTC by Yosef Or Boczko
Modified: 2014-10-07 11:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Builder - incorrectly searching (916.18 KB, application/octet-stream)
2014-10-01 21:17 UTC, Yosef Or Boczko
  Details
vim: make search with * and # match closer to VIM. (2.03 KB, patch)
2014-10-06 21:19 UTC, Christian Hergert
committed Details | Review

Description Yosef Or Boczko 2014-10-01 21:17:37 UTC
Created attachment 287544 [details]
Builder - incorrectly searching

Put the cursor under ->|priv (before priv), and than hit # (or *).
It will move to more priv, and than to part of FooBarPrivate. at the
next one you hit # it will find for FooBarPrivate instead of only priv.

To make sense, I attached a screencast.
Comment 1 Christian Hergert 2014-10-06 21:03:14 UTC
So this is half way fixed now by fixing word boundaries to look more like VIM.

The next step is to make the gtksourcesearchcontext only match whole words.
Comment 2 Christian Hergert 2014-10-06 21:19:03 UTC
Created attachment 287883 [details] [review]
vim: make search with * and # match closer to VIM.

 * wrap-around: allows us to jump to the end of the buffer when we
   reach the top. (and vice-versa)
 * case-sensitive: makes priv not match FooPrivate
 * word-boundaries: forces us to find whole words that match
Comment 3 Christian Hergert 2014-10-06 21:19:39 UTC
Fixed in master.

Attachment 287883 [details] pushed as d8f9ac0 - vim: make search with * and # match closer to VIM.
Comment 4 Florian Müllner 2014-10-07 11:07:17 UTC
(In reply to comment #3)
> Fixed in master.
> 
> Attachment 287883 [details] pushed as d8f9ac0 - vim: make search with * and # match
> closer to VIM.

There's still a very noticeable difference though, given that gtksourceview's search uses pango word boundaries rather than vim words ...