aboutsummaryrefslogtreecommitdiff
path: root/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/commands.c b/commands.c
index ffe03f3b..2727c1f2 100644
--- a/commands.c
+++ b/commands.c
@@ -3,9 +3,10 @@
#define LOG_MODULE "commands"
#define LOG_ENABLE_DBG 0
#include "log.h"
-#include "terminal.h"
-#include "render.h"
#include "grid.h"
+#include "render.h"
+#include "selection.h"
+#include "terminal.h"
#include "util.h"
void
@@ -73,6 +74,7 @@ cmd_scrollback_up(struct terminal *term, int rows)
else
diff = (term->grid->num_rows - new_view) + term->grid->view;
+ selection_view_up(term, new_view);
term->grid->view = new_view;
if (diff >= 0 && diff < term->rows) {
@@ -146,6 +148,7 @@ cmd_scrollback_down(struct terminal *term, int rows)
else
diff = (term->grid->num_rows - term->grid->view) + new_view;
+ selection_view_down(term, new_view);
term->grid->view = new_view;
if (diff >= 0 && diff < term->rows) {