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

"Replace selection" should work on all matches in a selection #287

Open
humdingerb opened this issue Jan 13, 2024 · 2 comments
Open

"Replace selection" should work on all matches in a selection #287

humdingerb opened this issue Jan 13, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@humdingerb
Copy link
Contributor

Currently it seems like the "Replace selection" action only works if the selection is exactly the search term.

I think it would be much more useful if it were "Replace in selection", i.e. you select several lines of code and the replace action would replace every occurance of the search term within that selection.

Maybe that was the intention from the beginnging, then this is a bug (and the tooltip should say "Replace in selection".

@Freaxed
Copy link
Collaborator

Freaxed commented Jan 18, 2024

It's not a bug the code is checking if the selected text is exatrly the text to replace. Not very useful.
To me the right solution should be to remove that action, add a checkbox at the right and call it "In selection". All the actions then will be relative to the selection only.

@humdingerb
Copy link
Contributor Author

Agreed. Normally, one wouldn't even need the checkmark. What else would anyone expect when having a selection while replacing stuff? OTOH, the checkmark is an obvious hint how things work. On the still other hand, the checkmark means the user always has to make one more click in addition to the selection.

Is it intuitive enough? You guys decide... :)

@nexus6-haiku nexus6-haiku added the enhancement New feature or request label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants