From 1756c015228ab528ad65ee20eb6ecc01df2cd390 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 16 Jun 2018 23:09:43 -0700 Subject: [PATCH] GUACAMOLE-573: Update selected region when terminal scrolls. --- src/terminal/terminal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index 40c90995..ce89856e 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -1023,6 +1023,12 @@ int guac_terminal_scroll_up(guac_terminal* term, term->visible_cursor_row <= end_row) term->visible_cursor_row -= amount; + /* Update selected region */ + if (term->text_selected) { + term->selection_start_row -= amount; + term->selection_end_row -= amount; + } + } /* Otherwise, just copy row data upwards */