summaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-02-21 10:04:31 +0000
committerBlaž Hrastnik2021-02-21 10:04:31 +0000
commit7da6bd6a71531713c4de58b04810e32e16eb349a (patch)
treeb85148f13d5f86abf484d24e3c2d93a000149845 /helix-term/src/ui
parent7877647cf0812380623b0087fbd7bea0ee9fae20 (diff)
commands: Simplify some code, only calling cx.doc() once.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 7d812116..af9d0414 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -436,7 +436,7 @@ impl Component for EditorView {
// mode => write!(stdout, "\x1B[2 q"),
// };
let view = editor.view();
- let cursor = view.doc.state.selection().cursor();
+ let cursor = view.doc.selection().cursor();
let mut pos = view
.screen_coords_at_pos(view.doc.text().slice(..), cursor)