Properly update visible cursor row when terminal scrolled.

This commit is contained in:
Michael Jumper 2013-05-15 13:55:40 -07:00
parent 9b0a210c12
commit 791da3dc81

View File

@ -192,6 +192,11 @@ int guac_terminal_scroll_up(guac_terminal* term,
if (term->buffer->length > term->buffer->available)
term->buffer->length = term->buffer->available;
/* Update cursor location if within region */
if (term->visible_cursor_row >= start_row &&
term->visible_cursor_row <= end_row)
term->visible_cursor_row -= amount;
}
/* Otherwise, just copy row data upwards */