ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
370 stars 52 forks source link

Set value of Search String when Find/Replace is opened and Ctrl+F/H is used #445

Closed ProgerXP closed 1 year ago

ProgerXP commented 1 year ago

This is a Notepad2 behaviour. When Find (Replace) dialog is not visible, Ctrl+F (Ctrl+H) opens it and sets Search String to the selected text (if any). When it is visible, the hotkey only focuses the dialog without changing Search String. Make it change String even in the latter case, unless selection in the document is empty.

cshnik commented 1 year ago

Done.

ProgerXP commented 1 year ago

Value of the input in non-modal Go To (#260) must override the document's selection if user presses Ctrl+F/H while Go To is focused. In other words, if document has non-empty selection and Go To is visible, Ctrl+F when focus is in the document opens Find with input = selection, while Ctrl+F when focus is in the Go To dialog opens Find with input = Go To's value.