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

add history suggest to global search #2717

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1743,11 +1743,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()
Expand Down
1 change: 0 additions & 1 deletion helix-view/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ impl Tree {
{
if let Some(pos) = container.children.iter().position(|&child| child == index) {
container.children.remove(pos);

// TODO: if container now only has one child, remove it and place child in parent
if container.children.is_empty() && parent_id != self.root {
// if container now empty, remove it
Expand Down