Skip to content
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

Remember search text in Find/Replace in Files dialog #89085

Merged
merged 1 commit into from
Mar 8, 2024

Conversation

miv391
Copy link
Contributor

@miv391 miv391 commented Mar 2, 2024

Fixes godotengine/godot-proposals#6340

Find/Replace in Files dialog works now using the same operating logic as vscode. If the user has selected something in the code editor, that selection is used. But if nothing is selected, then previous search string is not cleared. In Replace mode focus is set either to Find text edit or Replace text edit depending on what the user is likely to type next.

  • Find in Files (Ctrl+Shift+F)

    • some text is selected -> use that as Find string
    • no text is selected -> do not change Find string
  • Replace in Files (Ctrl+Shift+R)

    • some text is selected -> use that as Find string, focus Replace text edit
    • no text is selected -> do not change Find string, focus Find text edit

editor/find_in_files.cpp Outdated Show resolved Hide resolved
@miv391 miv391 force-pushed the remember-search-replace-text branch from 3b35482 to bfd1700 Compare March 8, 2024 15:43
@akien-mga akien-mga modified the milestones: 4.x, 4.3 Mar 8, 2024
@akien-mga akien-mga merged commit d78fafa into godotengine:master Mar 8, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@miv391 miv391 deleted the remember-search-replace-text branch March 9, 2024 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remember last Find in Files / Replace in Files search text
4 participants