In a text file when using search and replace, search direction is set to Down by default. That assumes that you've started search at file beginning. Especially in a longer text file you might well start somewhere other than the start. Changing default search to Both makes more sense when searching somewhere other than the start or end - a more likely scenario.
IMHO this "Both" option is confusing, a additional option like "Wrap search" or "Wrap around" is much more sane (and is the way pretty much text editors handle this). Also, when the "Replace all in:" option is active, "Search direction" is useless and could deactivated.
@Andre: From what I've tested "both" just wraps the search after searching "down" is done.
Yeah, I know, what I mean is that "Both" as a search direction is strange, how can a search be done up and down? Instead it just goes down and then wraps to the beginning.
So basically you're saying that the string is misleading? I guess we should check how this option is named in other editors.
Yep, it's confusing. As I stated in comment #1, this would be a case to create another option(chechbox) for Wrap Search.
Created attachment 9218 0001-Add-Wrap-around-check-box-to-Find-and-Replace-dialog.patch
Created attachment 9219 0002-Update-window-title-of-Find-and-Replace-dialog.patch
Created attachment 9220 0003-Do-not-update-occurrences-counter-when-pressing-Find.patch
Created attachment 9221 0004-Properly-disconnect-signal-handlers.patch This patch is needed to fix an issue that occurs when closing and opening the Find and Replace dialog.
Hmmm, I don't know if I'm doing wrong, but it seems Wrap around is not working, once it reaches the end of the document it doesn't start from the beginning (same behavior for Find and Replace). Also, Search direction only makes sense if Replace all in is not checked
I had to install the compiled Mousepad to /usr/local so that the updated gsettings schema file would be used. You mean the widget sensitivity should be dynamically changed?
(In reply to Theo Linkspfeifer from comment #11) > I had to install the compiled Mousepad to /usr/local so that the updated > gsettings schema file would be used. Yes confirmed, now it's working almost as expected, only when Search direction is Up and Wrap around is checked, Find won't continue from bottom when the top is reached. > You mean the widget sensitivity should be dynamically changed? Maybe not, Find doesn't work only if Replace all in: Selection is selected, for the other options Wrap around works, only the direction is always Down. (This dialog is somewhat buggy already, feel free to handle those problems later).
The search direction is ignored in that case due to the "! replace_all" check here: https://git.xfce.org/apps/mousepad/tree/mousepad/mousepad-replace-dialog.c#n321
-- 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/15. 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