diff options
author | Nathan Vegdahl | 2021-07-19 16:25:10 +0000 |
---|---|---|
committer | Nathan Vegdahl | 2021-07-19 16:25:10 +0000 |
commit | b0311f4fc246f370bb317ab0b1fcb89823347caa (patch) | |
tree | 7bb7f6783cdba83d784af2bcbd780e57a32c715c /helix-view/src/view.rs | |
parent | 079d4ed86df30c78ca00fd4b86f906c3ea9df7db (diff) |
Fixed primary cursor position calculation to use 1-width semantics.
This had a bunch of knock-on effects that were buggy, such as bracket
match highlighting.
Diffstat (limited to 'helix-view/src/view.rs')
-rw-r--r-- | helix-view/src/view.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs index ccb61646..67585ed3 100644 --- a/helix-view/src/view.rs +++ b/helix-view/src/view.rs @@ -84,7 +84,7 @@ impl View { } pub fn ensure_cursor_in_view(&mut self, doc: &Document) { - let cursor = doc.selection(self.id).cursor(); + let cursor = doc.selection(self.id).cursor(doc.text().slice(..)); let pos = coords_at_pos(doc.text().slice(..), cursor); let line = pos.row; let col = pos.col; |