We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 820e469 commit 924de3bCopy full SHA for 924de3b
helix-term/src/commands.rs
@@ -2504,7 +2504,22 @@ pub fn command_palette(cx: &mut Context) {
2504
on_next_key_callback: None,
2505
jobs: cx.jobs,
2506
};
2507
+ let focus = view!(ctx.editor).id;
2508
+
2509
command.execute(&mut ctx);
2510
2511
+ if ctx.editor.tree.contains(focus) {
2512
+ let config = ctx.editor.config();
2513
+ let mode = ctx.editor.mode();
2514
+ let view = view_mut!(ctx.editor, focus);
2515
+ let doc = doc_mut!(ctx.editor, &view.doc);
2516
2517
+ view.ensure_cursor_in_view(doc, config.scrolloff);
2518
2519
+ if mode != Mode::Insert {
2520
+ doc.append_changes_to_history(view);
2521
+ }
2522
2523
});
2524
compositor.push(Box::new(overlayed(picker)));
2525
},
0 commit comments