aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-12 18:20:26 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-12 18:20:26 +0000
commitd75e50230eb91b87bf6880177bd9fe32ab964140 (patch)
treec0ad7e70f744f80bb7023da957d1ba141ae859f5 /terminal.c
parentMerge branch 'releases/1.5' into master (diff)
parentselection: auto-scroll: call cmd_scrollback_{up,down}() with number of rows (diff)
Merge branch 'scroll-up-down-while-selecting' into master
Closes #149
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/terminal.c b/terminal.c
index 7aacb58c..c1f8c06c 100644
--- a/terminal.c
+++ b/terminal.c
@@ -985,6 +985,9 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper,
.selection = {
.start = {-1, -1},
.end = {-1, -1},
+ .auto_scroll = {
+ .fd = -1,
+ },
},
.normal = {.scroll_damage = tll_init(), .sixel_images = tll_init()},
.alt = {.scroll_damage = tll_init(), .sixel_images = tll_init()},
@@ -1164,6 +1167,7 @@ term_shutdown(struct terminal *term)
term_cursor_blink_disable(term);
+ fdm_del(term->fdm, term->selection.auto_scroll.fd);
fdm_del(term->fdm, term->render.app_sync_updates.timer_fd);
fdm_del(term->fdm, term->delayed_render_timer.lower_fd);
fdm_del(term->fdm, term->delayed_render_timer.upper_fd);
@@ -1176,6 +1180,7 @@ term_shutdown(struct terminal *term)
else
close(term->ptmx);
+ term->selection.auto_scroll.fd = -1;
term->render.app_sync_updates.timer_fd = -1;
term->delayed_render_timer.lower_fd = -1;
term->delayed_render_timer.upper_fd = -1;
@@ -1226,6 +1231,7 @@ term_destroy(struct terminal *term)
}
}
+ fdm_del(term->fdm, term->selection.auto_scroll.fd);
fdm_del(term->fdm, term->render.app_sync_updates.timer_fd);
fdm_del(term->fdm, term->delayed_render_timer.lower_fd);
fdm_del(term->fdm, term->delayed_render_timer.upper_fd);