|
|
|
@ -1302,8 +1302,6 @@ impl Component for EditorView {
|
|
|
|
|
cx.editor.status_msg = None;
|
|
|
|
|
|
|
|
|
|
let mode = cx.editor.mode();
|
|
|
|
|
let (view, _) = current!(cx.editor);
|
|
|
|
|
let focus = view.id;
|
|
|
|
|
|
|
|
|
|
if let Some(on_next_key) = self.on_next_key.take() {
|
|
|
|
|
// if there's a command waiting input, do that first
|
|
|
|
@ -1385,12 +1383,9 @@ impl Component for EditorView {
|
|
|
|
|
return EventResult::Ignored(None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if the focused view still exists and wasn't closed
|
|
|
|
|
if cx.editor.tree.contains(focus) {
|
|
|
|
|
let config = cx.editor.config();
|
|
|
|
|
let mode = cx.editor.mode();
|
|
|
|
|
let view = view_mut!(cx.editor, focus);
|
|
|
|
|
let doc = doc_mut!(cx.editor, &view.doc);
|
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|
|
|
|
|
|
|
view.ensure_cursor_in_view(doc, config.scrolloff);
|
|
|
|
|
|
|
|
|
@ -1399,7 +1394,6 @@ impl Component for EditorView {
|
|
|
|
|
if mode != Mode::Insert {
|
|
|
|
|
doc.append_changes_to_history(view);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EventResult::Consumed(callback)
|
|
|
|
|
}
|
|
|
|
|