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

Mode for literal search #3177

Closed
dustdfg opened this issue Mar 15, 2024 · 2 comments
Closed

Mode for literal search #3177

dustdfg opened this issue Mar 15, 2024 · 2 comments

Comments

@dustdfg
Copy link
Contributor

dustdfg commented Mar 15, 2024

Description of the problem or steps to reproduce

When I select text and press Ctrl+f, it automatically opens search in the infowindow and inserts selected text there. But it treat it like a regex.... If for example I selected my_func() to see where this function is called without arguments I will get a regex with empty group () so I will get all the places where the function is called (also counting places where it is called with arguments) or even if I just use it for assigning a variable/lambda like var a = my_func.

In general I could rewrite this issue as I need a literal search mode like in the replace(all) commands

Specifications

Commit hash: current master
OS: Debian 12/testing
Terminal: foot

@dustdfg
Copy link
Contributor Author

dustdfg commented Mar 15, 2024

Or as partial solution when user selects text text and presses ctrl+f it is possible to automatically add \ where is needed...

@dmaluka
Copy link
Collaborator

dmaluka commented Mar 15, 2024

You can already do literal search, by using Alt-Shift-f instead of Ctrl-f. Or you can bind Ctrl-f to FindLiteral instead of the default Find.

But yeah, it makes sense to automatically escape the selected text in the case of regex search, so that it does the right thing in all cases. Fixed in 399134f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants