From 297b5c4734cdc07b5cc3db03a63dfd786debfd84 Mon Sep 17 00:00:00 2001 From: Matheus Afonso Martins Moreira Date: Sun, 7 Apr 2024 05:42:12 -0300 Subject: [PATCH] terminal: track whether the scrollback is limited The terminal will have an unlimited scrollback mode where new memory is allocated when it is filled up. --- terminal.c | 1 + terminal.h | 1 + 2 files changed, 2 insertions(+) diff --git a/terminal.c b/terminal.c index 3fb918a4..be1661af 100644 --- a/terminal.c +++ b/terminal.c @@ -1266,6 +1266,7 @@ term_init(const struct config *conf, struct fdm *fdm, struct reaper *reaper, .queue = tll_init(), }, }, + .unlimited_scrollback = conf->scrollback.unlimited, .delayed_render_timer = { .is_armed = false, .lower_fd = delay_lower_fd, diff --git a/terminal.h b/terminal.h index fa80e693..ea3ef105 100644 --- a/terminal.h +++ b/terminal.h @@ -370,6 +370,7 @@ struct terminal { int cols; /* number of columns */ int rows; /* number of rows */ struct scroll_region scroll_region; + bool unlimited_scrollback; struct charsets charsets; struct charsets saved_charsets; /* For save/restore cursor + attributes */