You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug]: Find/replace: regexp is forgotten if searching without dialog open
There is a mix-up between Find next/Find prev and Find next at caret/Find previous at caret
= Scenario =
Go to the top of a .cpp file with lots of if-statements in :-)
In Find/replace dialog switch to "Regex" - enter a regex like if .*$
Verify that you can search forwards and backwards using both dialog buttons and Find next and Find previous hotkeys...
Ensure that no text is selected in the editor - then close the Find/Replace dialog...
Now press (once) on either Find next and Find previous hotkey... - it finds a line matching the regex
If you unselect the selected search result you can repeat your search using the regex by pressing on its hotkey
But if you leave the search result selected - then pressing Find next hotkey will no longer search for the regex - it will search for the selection - and that is wrong as I did not invoke Find next at caret
= Summary =
There should be a distinction between Find next/Find prev and Find next at caret/Find previous at caret hotkey functions:
Find next/Find prev should always search for whatever was entered into the Find/replace dialog - no matter what is selected in the editor.
Find next at caret/Find previous at caret should search for the currently selected text
Version
Self compiled
Operating system
Linux
Steps to reproduce
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. FYI: this is now a regression, as this is the behavior from the previous view (using embedded panel).
I think that the solution here is to use a control with drop down that will remember the previous searches / replacements
Having a history of previous searches / replacements is an extra bonus (I think)
As a minimal solution just distinction between Find next/Find prev and Find next at caret/Find previous at caret hotkey functionality would be more than fine :-)
If there is a selection "Find" will use the selection as the "find what", this is how it always worked. This is very useful in 90% of the cases: you just select something and hit F3 no need to open extra windows
"Find next at caret" does not require a selection, it detects the word boundaries from the caret position and uses it as the "find what" (so it basically similar to the above with an addition 1 step: it performs the selection by itself)
Tip: to quickly clear selection, you can hit ESCAPE - so what you are suggesting is changing the current behavior (which I like). So as compromise, I would say that we need an extra checkbox somewhere that says: "Use selected text as 'find what'"
What happened?
[Bug]: Find/replace: regexp is forgotten if searching without dialog open
There is a mix-up between
Find next
/Find prev
andFind next at caret
/Find previous at caret
= Scenario =
Go to the top of a .cpp file with lots of
if
-statements in :-)In Find/replace dialog switch to "Regex" - enter a regex like
if .*$
Verify that you can search forwards and backwards using both dialog buttons and
Find next
andFind previous
hotkeys...Ensure that no text is selected in the editor - then close the Find/Replace dialog...
Now press (once) on either
Find next
andFind previous
hotkey... - it finds a line matching the regexIf you unselect the selected search result you can repeat your search using the regex by pressing on its hotkey
But if you leave the search result selected - then pressing
Find next
hotkey will no longer search for the regex - it will search for the selection - and that is wrong as I did not invokeFind next at caret
= Summary =
There should be a distinction between
Find next
/Find prev
andFind next at caret
/Find previous at caret
hotkey functions:Find next
/Find prev
should always search for whatever was entered into the Find/replace dialog - no matter what is selected in the editor.Find next at caret
/Find previous at caret
should search for the currently selected textVersion
Self compiled
Operating system
Linux
Steps to reproduce
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: