aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
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 0afe39d5..2cb53ad3 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()},
@@ -1163,6 +1166,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);
@@ -1175,6 +1179,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;
@@ -1225,6 +1230,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);