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 723267 - Pressing Ctrl+F again appends to the previous search string
Pressing Ctrl+F again appends to the previous search string
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: search and replace
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-30 08:01 UTC by Fabian Greffrath
Modified: 2014-02-02 21:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ViewFrame: select text in the search entry (1.64 KB, patch)
2014-02-02 21:25 UTC, Sébastien Wilmet
none Details | Review

Description Fabian Greffrath 2014-01-30 08:01:17 UTC
I edit a text which contains a string "A" that I search for. I press Ctrl+F and type "A" and iterate through the results until I find the one I am looking for. Then I search for another string "B". so I press Ctrl+F again and type "B". The "B" is appended to the previous search string "A" so now my search strings reads "AB" which makes no sense.

I understand that as long as "A" is highlighted/marked as a search result it is the pre-selected search string when Ctrl+F is pressed. But please, leave it marked in the search string box, so that the search string I enter then overrides it. Generally, if I press Ctrl+F I am searching for a *new* string, else I would be pressing Ctrl+G.

Thanks,

 - Fabian
Comment 1 André Klapper 2014-01-30 10:05:35 UTC
Yeah. I hate this too.
Comment 2 Ignacio Casal Quinteiro (nacho) 2014-01-30 10:18:23 UTC
Have you tried pressing control+f twice? :P
Comment 3 Fabian Greffrath 2014-01-30 10:40:53 UTC
Do you call this intuitive? (though, it works)
Comment 4 jessevdk@gmail.com 2014-01-30 11:18:30 UTC
I would also like to see this fixed.
Comment 5 Sébastien Wilmet 2014-02-02 21:25:39 UTC
Created attachment 267869 [details] [review]
ViewFrame: select text in the search entry

Steps:
- Ctrl+F and search for 'something', with a least one match
- the match becomes selected in the buffer
- press Enter to quit the search
- press Ctrl+F again
- the search takes the buffer selection to put it in the search entry

What the code did in this case is to put the cursor at the end of the
search text (in the search entry). Now it selects the text.
Comment 6 Sébastien Wilmet 2014-02-02 21:29:31 UTC
With the above patch, when the search takes the GtkTextBuffer selection to put it in the search entry, it will always select the text in the search entry.
Comment 7 Sébastien Wilmet 2014-02-02 21:44:12 UTC
The commit is pushed to the master and gnome-3-10 branches.