aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorTermina942022-06-21 16:52:25 +0000
committerGitHub2022-06-21 16:52:25 +0000
commita17626a822b36d4de3146c2d410f976e19dd189c (patch)
tree555b9544fac260275776b5ad3d4a7ef028d98e9a /helix-term
parent8e8367eea6ff146c7e1097af153398832691e078 (diff)
add history suggest to global search (#2717)
Co-authored-by: Dean Revell <revell@gmail.com>
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index d4fa34e0..68c585b0 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1747,11 +1747,13 @@ fn global_search(cx: &mut Context) {
let smart_case = config.search.smart_case;
let file_picker_config = config.file_picker.clone();
- let completions = search_completions(cx, None);
+ let reg = cx.register.unwrap_or('/');
+
+ let completions = search_completions(cx, Some(reg));
ui::regex_prompt(
cx,
"global-search:".into(),
- None,
+ Some(reg),
move |_editor: &Editor, input: &str| {
completions
.iter()