From a1d4630a251c56bf56d881158be330a751dc02ae Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 26 May 2017 13:11:27 +0530 Subject: [PATCH] Fix incorrect implementation of the Vertical Position Adjust (VPA) CSI code Fixes #80 --- kitty/screen.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/kitty/screen.c b/kitty/screen.c index a71880eb5..797a30ad8 100644 --- a/kitty/screen.c +++ b/kitty/screen.c @@ -738,13 +738,7 @@ screen_cursor_position(Screen *self, unsigned int line, unsigned int column) { void screen_cursor_to_line(Screen *self, unsigned int line) { - unsigned int y = MAX(line, 1) - 1; - y += self->margin_top; - if (y != self->cursor->y) { - self->cursor->y = y; - screen_ensure_bounds(self, false); // TODO: should we also restrict the cursor to the scrolling region? - tracker_cursor_changed(self->change_tracker); - } + screen_cursor_position(self, line, self->cursor->x + 1); } // }}}