|
|
|
@ -3439,7 +3439,8 @@ fn goto_last_diag(cx: &mut Context) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn goto_next_diag(cx: &mut Context) {
|
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|
|
let motion = move |editor: &mut Editor| {
|
|
|
|
|
let (view, doc) = current!(editor);
|
|
|
|
|
|
|
|
|
|
let cursor_pos = doc
|
|
|
|
|
.selection(view.id)
|
|
|
|
@ -3457,10 +3458,14 @@ fn goto_next_diag(cx: &mut Context) {
|
|
|
|
|
None => return,
|
|
|
|
|
};
|
|
|
|
|
doc.set_selection(view.id, selection);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cx.editor.apply_motion(motion);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn goto_prev_diag(cx: &mut Context) {
|
|
|
|
|
let (view, doc) = current!(cx.editor);
|
|
|
|
|
let motion = move |editor: &mut Editor| {
|
|
|
|
|
let (view, doc) = current!(editor);
|
|
|
|
|
|
|
|
|
|
let cursor_pos = doc
|
|
|
|
|
.selection(view.id)
|
|
|
|
@ -3481,6 +3486,8 @@ fn goto_prev_diag(cx: &mut Context) {
|
|
|
|
|
None => return,
|
|
|
|
|
};
|
|
|
|
|
doc.set_selection(view.id, selection);
|
|
|
|
|
};
|
|
|
|
|
cx.editor.apply_motion(motion)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn goto_first_change(cx: &mut Context) {
|
|
|
|
|