minor: Simplify another document_mut statement

This commit is contained in:
Blaž Hrastnik 2022-09-04 17:27:15 +09:00
parent f0d1caafcf
commit cc4b71274a
No known key found for this signature in database
GPG Key ID: 1238B9C4AD889640

View File

@ -195,7 +195,7 @@ pub fn new(args: Args, config: Config) -> Result<Self, Error> {
// `--vsplit` or `--hsplit` are used, the file which is
// opened last is focused on.
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));
doc.set_selection(view_id, pos);
}