Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/picker.rs')
| -rw-r--r-- | helix-term/src/ui/picker.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index e2d15ed2..ffec0fd8 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -1031,9 +1031,17 @@ impl<I: 'static + Send + Sync, D: 'static + Send + Sync> Component for Picker<I, self.handle_prompt_change(); } else { if let Some(option) = self.selection() { - self.prompt.save_line_to_history(ctx.editor); (self.callback_fn)(ctx, option, Action::Replace); } + if let Some(history_register) = self.prompt.history_register() { + if let Err(err) = ctx + .editor + .registers + .push(history_register, self.primary_query().to_string()) + { + ctx.editor.set_error(err.to_string()); + } + } return close_fn(self); } } |