-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening the Find and Replace panel while the Find panel is already active should take over the find pattern #1480
Comments
Related (albeit the opposite), a request to have the history for the two panels independent: #798 |
@AndreyMZ I feel that it is still potentially relevant, in the sense that, there is some crossover when moving from the "Find" or "Replace" panel to the "Find in Files" panel. For example, if you had independent settings, would you expect, when switching to the "Find in Files" panel from "Find" or "Replace", that the settings would be copied across with the search pattern/text or not? |
Now:
On #798 I expect that when we switch from "Find" or "Replace" to "Find in Files" (or back from "Find in Files" to "Find" or "Replace"), nothing is copied across. I do not care if the find pattern is overridden by the text selected or not. On this issue I believe @FichteFoll expects that when we switch from "Find" to "Replace" (or back from "Replace" to "Find") and some text is selected in the file editor, everything possible is copied across and the find pattern is NOT overridden by the text selected. |
The culprit is ST performing a search run with the entered "find" pattern, when switching panels (Find <-> Replace <-> Find in Files). What we see in the new panel is the result of that search. @wbond Hence I would mark that an issue rather an enhancement. Steps to reproduce
Here is a forum post about it: |
This comment from from the forum narrows down the reason for the described behavior more clearly. While picking up the current selection when pressing ctrl+f, ctrl+h or ctrl+shift+h is a helpful feature, it should propably be disabled if a search panel is already open and is focused. If the caret is within one of the input fields of a find/replace panel, there is nothing new to pick up when switching to another panel. This is the one and only situation the content of the search field should remain unchanged. |
Same here. |
Summary
It happens quite frequently that I open the find panel, I modify the find pattern and later realize that I need to do a replace action. So I open the replace panel but the find pattern I already entered is lost, which is quite annoying. Instead, the pattern should be taken over if the find panel was open already.
Steps to reproduce
Desired behavior
The "Find What:" field takes over the pattern from the previously opened find panel.
Actual behavior
The "Find What:" field gets filled with the current selection in the view.
The text was updated successfully, but these errors were encountered: