-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Global search no longer adds into search history #11205
Comments
Agree, the global search history was soo good. |
I had the same complaint so Mike added some basic history support to global search. Global search appends to the history register when you select a picker entry so the usecasw of globalsearch and using Regarding selecting from the history you will notice that when the glboal search picker is empty it preview the last entry in the history and you can hit enter to use that. I do wish we had a way to scroll history like we could with up/down. Mike different that to future work since that would take more complex ui |
Actually I think there's an oversight with saving to a register on Selecting from the history register is basically just a UI problem as Pascal says. Figuring out where to show the options is tricky - we could add Menu or something on top of the picker but that could become quite cluttered. Maybe we could add a small pane between the prompt and the options for completion candidates. |
I think selecting from history it could just be a keybinding like a-n/a-p or a-up/a-down or similar. The old.prompt doesn't shown a history either. We need to streamline the picker keybindings to find space for that they are cluttered right now and filled woth duplicates |
I marked #11209 as closing this since the main focus from the description is on adding to history. The discussion about selecting things other than the most recent history is also valuable though, I'll add another issue about that and link back here |
Tested #11209 and it works. Not that this is significant but 2 subtle differences this has with the old search history experience are:
|
Not sure we can fix the first one cleanly but the second one we can just move the |
Great! I think |
Summary
I'm firing this as bug report instead of enhancement as this used to work.
After upgrading to Picker v2, the global search feature turns from a command that accepts a pattern into a fully interactive picker. With the new picker-based search experience, the searched pattern is no longer persisted into the search history even when pressing Enter in the picker.
This breaks several usage patterns of global searching:
I often find myself using the global search feature to find the files that contain the pattern. Once I grab the file and handle that occurrence, I typically just press
n
to jump to the next occurrence within the file, instead of heading back to the picker with<space>
'
, as doing this minimizes context switch. This used to work because the pattern used to be persisted when doing the global search in the first place - so pressingn
works. It's no longer the case.I also find myself using the global search feature to replace or otherwise modify a specific string. One thing I like to do is to re-issue the same search again by doing the combo of
<space>
/
<enter>
. This is different from using the "last picker" as it performs a new search. By using the new search, I'm able to see my progress of replacing/modifying that string across different files. Once the new search becomes empty I'd know I'm done. But with the new global search experience it's no longer possible as it's not persisted. I have to enter the pattern each time for a new search.Yes, I know a local search would still update the search history. So technically a workaround is to do a local search first, then trigger the global search... But that's not very nice at all.
Oh and there's another issue with the new picker-based global search experience: it only presents the latest search history item, and there seems to be no option to use any other older items like you used to be able to do. I think it's pretty common to search a recently searched pattern, but that's no longer doable. I'll need to submit another bug/enhancement for this though.
Reproduction Steps
Just global search anything and realize that it's no in the search history.
Helix log
N/A
Platform
Any really
Terminal Emulator
Any really
Installation Method
Any really
Helix Version
helix 24.7 (b0cf86d)
The text was updated successfully, but these errors were encountered: