mirror of https://github.com/helix-editor/helix
minor: Simplify another document_mut statement
parent
f0d1caafcf
commit
cc4b71274a
|
@ -195,7 +195,7 @@ impl Application {
|
||||||
// `--vsplit` or `--hsplit` are used, the file which is
|
// `--vsplit` or `--hsplit` are used, the file which is
|
||||||
// opened last is focused on.
|
// opened last is focused on.
|
||||||
let view_id = editor.tree.focus;
|
let view_id = editor.tree.focus;
|
||||||
let doc = editor.document_mut(doc_id).unwrap();
|
let doc = doc_mut!(editor, &doc_id);
|
||||||
let pos = Selection::point(pos_at_coords(doc.text().slice(..), pos, true));
|
let pos = Selection::point(pos_at_coords(doc.text().slice(..), pos, true));
|
||||||
doc.set_selection(view_id, pos);
|
doc.set_selection(view_id, pos);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue