From b7e1c0cf8253703a5eeb8453de23c8d0a6137ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Sun, 4 Oct 2020 17:40:16 +0900 Subject: [PATCH] Fix cursor positioning on a scrolled buffer. --- helix-term/src/editor.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/helix-term/src/editor.rs b/helix-term/src/editor.rs index a348aa6e8..70b5758ee 100644 --- a/helix-term/src/editor.rs +++ b/helix-term/src/editor.rs @@ -289,10 +289,7 @@ impl Editor { execute!( stdout, - cursor::MoveTo( - pos.col as u16 + viewport.x, - pos.row as u16 - view.first_line + viewport.y, - ) + cursor::MoveTo(pos.col as u16 + viewport.x, pos.row as u16 + viewport.y,) ); } None => (),