GUACAMOLE-573: Update selected region when terminal scrolls.

Project: http://git-wip-us.apache.org/repos/asf/guacamole-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/guacamole-server/commit/1756c015
Tree: http://git-wip-us.apache.org/repos/asf/guacamole-server/tree/1756c015
Diff: http://git-wip-us.apache.org/repos/asf/guacamole-server/diff/1756c015

Branch: refs/heads/master
Commit: 1756c015228ab528ad65ee20eb6ecc01df2cd390
Parents: 6f08ef2
Author: Michael Jumper <mjum...@apache.org>
Authored: Sat Jun 16 23:09:43 2018 -0700
Committer: Michael Jumper <mjum...@apache.org>
Committed: Sun Jun 17 00:01:47 2018 -0700

----------------------------------------------------------------------
 src/terminal/terminal.c | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/guacamole-server/blob/1756c015/src/terminal/terminal.c
----------------------------------------------------------------------
diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c
index 40c9099..ce89856 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 */

Reply via email to