Created attachment 9878 0001-Don-t-search-for-previously-selected-text.patch If a search has already taken place, and the "find" feature is invoked again, a search is automatically launched for the previously selected text, which is not what we generally want. It moves us from where we are to find something that is out of date, which is quite confusing and annoying. If we actually want to search for this text again, we just have to press enter, but this search should not be automatic. The patch for that is straightforward. NB: Note also that the function whose call is eliminated in the patch: mousepad_search_bar_entry_changed(), is partly redundant with the function which calls it: mousepad_search_bar_focus().
A gentle objection to this change. This behavior in Mousepad mimics every GUI text editor I've used, and the behavior has been around in all those applications, including Mousepad, for years. Changing it would give Mousepad an inconsistent behavior compared to other applications and would surely break someone's workflow.
I don't have this behavior in Atom for instance. Are we talking about the exact same thing? I don't mean that the search field is filled with the previous search (classic behavior), I mean that this search is restarted when you type ^F.
I don't have this behavior in Gedit either.
I suspected I might have misunderstood you at a first pass. Apologies, and thanks for clarifying. When you say 'restarted', do you mean that the search results will start from the top of the file again? I'm trying to see if I can reproduce the behavior in my version.
No problem :) I mean that the search is launched again (technically the function mousepad_search_bar_entry_changed() is called), exactly as if you had done a new selection and search. Hence the cursor is moved from where we are to the first match, for a search that we generally don't care anymore. Generally, if one types ^F without selecting any text, it is only to have access to the search field to type something new, not to relaunch the previous search (that's why in this case, the previously searched text is entirely selected in the search field, so that typing any letter erases it). And the cursor should stay where it was before typing ^F, just like in Atom, Gedit or any other editor I think.
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/mousepad/-/issues/51. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev