on master help sign in
Ensure cursor in view after pipe (#1123)
bd56ddeIvan Tham
helix-term/src/commands.rs+4
@@ -5377,6 +5377,10 @@ fn shell(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) {
5377 doc.apply(&transaction, view.id);
5377 doc.apply(&transaction, view.id);
5378 doc.append_changes_to_history(view.id);
5378 doc.append_changes_to_history(view.id);
5379 }
5379 }
5380+
5381+ // after replace cursor may be out of bounds, do this to
5382+ // make sure cursor is in view and update scroll as well
5383+ view.ensure_cursor_in_view(doc, cx.editor.config.scrolloff);
5380 },
5384 },
5381 );
5385 );
5382
5386