on master help sign in
Ensure cursor in view after pipe (#1123)

Fix #1024

commitbd56dde6e28b22b661ad991d0f23b66e089a9700 authorIvan Tham <pickfire@riseup.net> dateThu 18 Nov 2021, 17:46 (5 years ago) parente9dc658
1 file changed+4
helix-term/src/commands.rs+4
helix-term/src/commands.rs+4
@@ -5377,6 +5377,10 @@ fn shell(cx: &mut Context, prompt: Cow<'static, str>, behavior: ShellBehavior) {
53775377 doc.apply(&transaction, view.id);
53785378 doc.append_changes_to_history(view.id);
53795379 }
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);
53805384 },
53815385 );
53825386