on master help sign in
add history suggest to global search (#2717)

Co-authored-by: Dean Revell <revell@gmail.com>

commita17626a822b36d4de3146c2d410f976e19dd189c authorTermina94 <47091253+Termina94@users.noreply.github.com> dateTue 21 Jun 2022, 17:52 (4 years ago) parent8e8367e
2 files changed+4−3
helix-term/src/commands.rs+4−2 helix-view/src/tree.rs−1
helix-term/src/commands.rs+4−2
@@ -1747,11 +1747,13 @@ fn global_search(cx: &mut Context) {
17471747 let smart_case = config.search.smart_case;
17481748 let file_picker_config = config.file_picker.clone();
17491749
1750− let completions = search_completions(cx, None);
1750+ let reg = cx.register.unwrap_or('/');
1751+
1752+ let completions = search_completions(cx, Some(reg));
17511753 ui::regex_prompt(
17521754 cx,
17531755 "global-search:".into(),
1754− None,
1756+ Some(reg),
17551757 move |_editor: &Editor, input: &str| {
17561758 completions
17571759 .iter()
helix-view/src/tree.rs−1
@@ -233,7 +233,6 @@ impl Tree {
233233 {
234234 if let Some(pos) = container.children.iter().position(|&child| child == index) {
235235 container.children.remove(pos);
236−
237236 // TODO: if container now only has one child, remove it and place child in parent
238237 if container.children.is_empty() && parent_id != self.root {
239238 // if container now empty, remove it