aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-02-04 07:50:16 +0000
committerBlaž Hrastnik2021-02-04 07:50:16 +0000
commita014787ee8418e27a48d7614ccdb7f9769087606 (patch)
treeaedd5c4562e1c8f6cfce36e3aa53e698ec99cd4b /helix-term
parent446a7e574359aa2da778d22ca9c5e3f98704fac7 (diff)
Correctly position the real terminal cursor.
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/editor.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index f05579e2..b23c9cf6 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -348,8 +348,8 @@ impl Component for EditorView {
let mut pos = view
.screen_coords_at_pos(&view.doc.text().slice(..), cursor)
.expect("Cursor is out of bounds.");
- pos.col += area.x as usize + OFFSET as usize;
- pos.row += area.y as usize;
+ pos.col += view.area.x as usize + area.x as usize + OFFSET as usize;
+ pos.row += view.area.y as usize + area.y as usize;
Some(pos)
}
}