Fix cursor positioning on a scrolled buffer.

pull/3/head
Blaž Hrastnik 4 years ago
parent 226fa89d46
commit b7e1c0cf82

@ -289,10 +289,7 @@ impl Editor {
execute!( execute!(
stdout, stdout,
cursor::MoveTo( cursor::MoveTo(pos.col as u16 + viewport.x, pos.row as u16 + viewport.y,)
pos.col as u16 + viewport.x,
pos.row as u16 - view.first_line + viewport.y,
)
); );
} }
None => (), None => (),

Loading…
Cancel
Save