@@ -195,7 +195,7 @@ impl Application {
195 // `--vsplit` or `--hsplit` are used, the file which is
195 // `--vsplit` or `--hsplit` are used, the file which is
196 // opened last is focused on.
196 // opened last is focused on.
197 let view_id = editor.tree.focus;
197 let view_id = editor.tree.focus;
198− let doc = editor.document_mut(doc_id).unwrap();
198+ let doc = doc_mut!(editor, &doc_id);
199 let pos = Selection::point(pos_at_coords(doc.text().slice(..), pos, true));
199 let pos = Selection::point(pos_at_coords(doc.text().slice(..), pos, true));
200 doc.set_selection(view_id, pos);
200 doc.set_selection(view_id, pos);