diff options
author | Blaž Hrastnik | 2021-11-06 15:31:39 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-11-06 15:32:28 +0000 |
commit | 2e1aa5f15bf0a56be0c44a86276cc9efea16ccbc (patch) | |
tree | dbb379f5799193cfebcb7b88449568e4e79aa13e /helix-term/src/ui | |
parent | a5ea61433c42ec05cd21c8b5c437827a66efb906 (diff) |
Fix compilation
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/editor.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 706cf8bb..054bb2c2 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -1085,7 +1085,7 @@ impl EditorView { if let Some((line, _, view_id)) = result { editor.tree.focus = view_id; - let doc = &mut editor.documents[editor.tree.get(view_id).doc]; + let doc = editor.documents.get_mut(&editor.tree.get(view_id).doc).unwrap(); if let Ok(pos) = doc.text().try_line_to_char(line) { doc.set_selection(view_id, Selection::point(pos)); commands::dap_toggle_breakpoint(cxt); @@ -1184,7 +1184,7 @@ impl EditorView { if let Some((line, _, view_id)) = result { cxt.editor.tree.focus = view_id; - let doc = &mut cxt.editor.documents[cxt.editor.tree.get(view_id).doc]; + let doc = cxt.editor.documents.get_mut(&cxt.editor.tree.get(view_id).doc).unwrap(); if let Ok(pos) = doc.text().try_line_to_char(line) { doc.set_selection(view_id, Selection::point(pos)); if modifiers == crossterm::event::KeyModifiers::ALT { |