From 791da3dc811436b57aa86451ce03bd07af828bf0 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 15 May 2013 13:55:40 -0700 Subject: [PATCH] Properly update visible cursor row when terminal scrolled. --- protocols/ssh/src/terminal.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/protocols/ssh/src/terminal.c b/protocols/ssh/src/terminal.c index 2c990fb1..601b60a0 100644 --- a/protocols/ssh/src/terminal.c +++ b/protocols/ssh/src/terminal.c @@ -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 */