@@ -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);
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);