Fix incorrect implementation of the Vertical Position Adjust (VPA) CSI code

Fixes #80
This commit is contained in:
Kovid Goyal 2017-05-26 13:11:27 +05:30
parent fafd710ce3
commit a1d4630a25
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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);
}
// }}}