mirror of https://github.com/helix-editor/helix
Restore deleted goto_pos function (#5164)
parent
f916915b53
commit
5c4a9cba9a
|
@ -2789,6 +2789,14 @@ fn exit_select_mode(cx: &mut Context) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn goto_pos(editor: &mut Editor, pos: usize) {
|
||||||
|
let (view, doc) = current!(editor);
|
||||||
|
|
||||||
|
push_jump(view, doc);
|
||||||
|
doc.set_selection(view.id, Selection::point(pos));
|
||||||
|
align_view(doc, view, Align::Center);
|
||||||
|
}
|
||||||
|
|
||||||
fn goto_first_diag(cx: &mut Context) {
|
fn goto_first_diag(cx: &mut Context) {
|
||||||
let (view, doc) = current!(cx.editor);
|
let (view, doc) = current!(cx.editor);
|
||||||
let selection = match doc.diagnostics().first() {
|
let selection = match doc.diagnostics().first() {
|
||||||
|
|
Loading…
Reference in New Issue