on master help sign in
minor: Simplify another document_mut statement
commitcc4b71274a9fbffe4081243b19f2234ed6492fb3 authorBlaž Hrastnik <blaz@mxxn.io> dateSun 4 Sep 2022, 17:27 (4 years ago) parentf0d1caa
1 file changed+1−1
helix-term/src/application.rs+1−1
helix-term/src/application.rs+1−1
@@ -195,7 +195,7 @@ impl Application {
195195 // `--vsplit` or `--hsplit` are used, the file which is
196196 // opened last is focused on.
197197 let view_id = editor.tree.focus;
198− let doc = editor.document_mut(doc_id).unwrap();
198+ let doc = doc_mut!(editor, &doc_id);
199199 let pos = Selection::point(pos_at_coords(doc.text().slice(..), pos, true));
200200 doc.set_selection(view_id, pos);
201201 }