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

global_search: Save search when accepting an option #11209

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

the-mikedavis
Copy link
Member

@the-mikedavis the-mikedavis commented Jul 17, 2024

The Prompt is set up to push the current line to history when hitting Enter but the Picker doesn't pass the Enter event down to the Prompt (for good reason: we don't want the Prompt's behavior of changing completions when we hit a path separator). We should save the Prompt's line to its configured history register when hitting Enter when there is a selection in the Picker.

This currently only applies to global_search's Picker since it's the only Picker to use Picker::with_history_register.

Fixes #11205

The Prompt is set up to push the current line to history when hitting
Enter but the Picker doesn't pass the Enter event down to the Prompt
(for good reason: we don't want the Prompt's behavior of changing
completions when we hit a path separator). We should save the Prompt's
line to its configured history register when hitting Enter when there
is a selection in the Picker.

This currently only applies to `global_search`'s Picker since it's the
only Picker to use `Picker::with_history_register`.
@the-mikedavis the-mikedavis added the A-command Area: Commands label Jul 17, 2024
@the-mikedavis the-mikedavis added this to the next milestone Jul 17, 2024
@archseer archseer merged commit c9d829a into master Jul 17, 2024
6 checks passed
@archseer archseer deleted the global-search-save-to-history branch July 17, 2024 13:41
mxxntype pushed a commit to mxxntype/helix that referenced this pull request Aug 14, 2024
The Prompt is set up to push the current line to history when hitting
Enter but the Picker doesn't pass the Enter event down to the Prompt
(for good reason: we don't want the Prompt's behavior of changing
completions when we hit a path separator). We should save the Prompt's
line to its configured history register when hitting Enter when there
is a selection in the Picker.

This currently only applies to `global_search`'s Picker since it's the
only Picker to use `Picker::with_history_register`.
stackotter pushed a commit to stackotter/helix that referenced this pull request Aug 28, 2024
The Prompt is set up to push the current line to history when hitting
Enter but the Picker doesn't pass the Enter event down to the Prompt
(for good reason: we don't want the Prompt's behavior of changing
completions when we hit a path separator). We should save the Prompt's
line to its configured history register when hitting Enter when there
is a selection in the Picker.

This currently only applies to `global_search`'s Picker since it's the
only Picker to use `Picker::with_history_register`.
kyruzic pushed a commit to kyruzic/helix that referenced this pull request Sep 27, 2024
The Prompt is set up to push the current line to history when hitting
Enter but the Picker doesn't pass the Enter event down to the Prompt
(for good reason: we don't want the Prompt's behavior of changing
completions when we hit a path separator). We should save the Prompt's
line to its configured history register when hitting Enter when there
is a selection in the Picker.

This currently only applies to `global_search`'s Picker since it's the
only Picker to use `Picker::with_history_register`.
plul pushed a commit to plul/helix that referenced this pull request Oct 13, 2024
The Prompt is set up to push the current line to history when hitting
Enter but the Picker doesn't pass the Enter event down to the Prompt
(for good reason: we don't want the Prompt's behavior of changing
completions when we hit a path separator). We should save the Prompt's
line to its configured history register when hitting Enter when there
is a selection in the Picker.

This currently only applies to `global_search`'s Picker since it's the
only Picker to use `Picker::with_history_register`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-command Area: Commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Global search no longer adds into search history
3 participants