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
Up/down arrow keys in the Find prompt are too error-prone #2169
Comments
Possible duplicate of #180 |
Just turn highlight matches off, no? |
Ah, you are right. Turning off "Highlight matches" gives me the behavior I want (the first of my proposed solutions). I do think that it is very not obvious, though, so allowing the key bindings to be customized in the Find dialog would still be nice. Turning off "Highlight matches" is definitely an acceptable workaround for me, especially since other matches are already highlighted from |
Is there is any solution to close find panel on cursor Up/Down? (I'm not using search history..) Not working:
By plugin? Linux Mint 19.3, Submit Text 3.2.2, Build 3211 |
// The `panel` key doesn't support regex_contains, unfortunately,
// so we have to duplicate the bindings for all panels.
// Matching `incremental_find` also doesn't seem to work?
// { "key": "panel", "operator": "regex_contains", "operand": "find" },
{ "keys": ["up"], "command": "hide_panel", "args": {"cancel": true},
"context": [{ "key": "panel", "operand": "find" }, { "key": "panel_has_focus" }],
},
{ "keys": ["down"], "command": "hide_panel", "args": {"cancel": true},
"context": [{ "key": "panel", "operand": "find" }, { "key": "panel_has_focus" }],
},
{ "keys": ["up"], "command": "hide_panel", "args": {"cancel": true},
"context": [{ "key": "panel", "operand": "replace" }, { "key": "panel_has_focus" }],
},
{ "keys": ["down"], "command": "hide_panel", "args": {"cancel": true},
"context": [{ "key": "panel", "operand": "replace" }, { "key": "panel_has_focus" }],
},
{ "keys": ["up"], "command": "hide_panel", "args": {"cancel": true},
"context": [{ "key": "panel", "operand": "incremental_find" }, { "key": "panel_has_focus" }],
},
{ "keys": ["down"], "command": "hide_panel", "args": {"cancel": true},
"context": [{ "key": "panel", "operand": "incremental_find" }, { "key": "panel_has_focus" }],
},
{ "keys": ["up"], "command": "hide_panel", "args": {"cancel": true},
"context": [{ "key": "panel", "operand": "find_in_files" }, { "key": "panel_has_focus" }],
},
{ "keys": ["down"], "command": "hide_panel", "args": {"cancel": true},
"context": [{ "key": "panel", "operand": "find_in_files" }, { "key": "panel_has_focus" }],
}, |
Thanks for fast answer!
Unfortunately doesnt work. Open find by Ctrl+F, press "Up" - move to previous element of history. if change to any other key (f.e. "ctrl+space"):
it works - close panel. |
Closing as this seems resolved. |
Summary
I often unwittingly press Up/Down while the Find prompt has keyboard focus in an attempt to navigate to a line adjacent to the match. Unfortunately, this results in searching for a different string in the Find history and makes me lose my place in the document. I then need to start my search over. Even though my search string is in the history, being forced to start my search over can be a huge penalty if I was wading through dozens or hundreds of matches.
Numerous other people have complained about this behavior as well: https://forum.sublimetext.com/t/up-down-arrow-keys-in-find-box/5741/16
Possible solutions
Expected behavior
Pressing Up/Down while the Find prompt has focus should not lose my place in the current document.
Actual behavior
Pressing Up/Down immediately searches for the previous/next item in the search history.
Steps to reproduce
Result:
The current line of the document changed to match against the search string from step 2.
Environment
The text was updated successfully, but these errors were encountered: