From ffa376edf7df3858ae8dc5f606a024c365c0f804 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 17 Oct 2023 09:55:32 +0000 Subject: Switch to tiparm_s (added in ncurses 6.4-20230424) instead of tparm, which allows ncurses to validate the capabilities correctly. --- tty-term.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tty-term.c b/tty-term.c index e26b765e..fbaeb23d 100644 --- a/tty-term.c +++ b/tty-term.c @@ -761,7 +761,7 @@ tty_term_string_i(struct tty_term *term, enum tty_code_code code, int a) { const char *x = tty_term_string(term, code), *s; - s = tparm((char *)x, a); + s = tiparm_s(1, 0, x, a); if (s == NULL) { log_debug("could not expand %s", tty_term_codes[code].name); return (""); @@ -774,7 +774,7 @@ tty_term_string_ii(struct tty_term *term, enum tty_code_code code, int a, int b) { const char *x = tty_term_string(term, code), *s; - s = tparm((char *)x, a, b); + s = tiparm_s(2, 0, x, a, b); if (s == NULL) { log_debug("could not expand %s", tty_term_codes[code].name); return (""); @@ -788,7 +788,7 @@ tty_term_string_iii(struct tty_term *term, enum tty_code_code code, int a, { const char *x = tty_term_string(term, code), *s; - s = tparm((char *)x, a, b, c); + s = tiparm_s(3, 0, x, a, b, c); if (s == NULL) { log_debug("could not expand %s", tty_term_codes[code].name); return (""); @@ -801,7 +801,7 @@ tty_term_string_s(struct tty_term *term, enum tty_code_code code, const char *a) { const char *x = tty_term_string(term, code), *s; - s = tparm((char *)x, (long)a); + s = tiparm_s(1, 1, x, a); if (s == NULL) { log_debug("could not expand %s", tty_term_codes[code].name); return (""); @@ -815,7 +815,7 @@ tty_term_string_ss(struct tty_term *term, enum tty_code_code code, { const char *x = tty_term_string(term, code), *s; - s = tparm((char *)x, (long)a, (long)b); + s = tiparm_s(2, 3, x, a, b); if (s == NULL) { log_debug("could not expand %s", tty_term_codes[code].name); return (""); -- cgit v1.2.3 From 36e1ac65560a34c6fa381f821f6b1b733f9b6ed6 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 23 Oct 2023 08:12:00 +0000 Subject: Unzoom window at start of destroy so it doesn't happen later (when destroying panes) after the layout has been freed, GitHub issue 3717. --- screen-write.c | 2 +- window.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/screen-write.c b/screen-write.c index 0fcd156f..01632f61 100644 --- a/screen-write.c +++ b/screen-write.c @@ -2013,7 +2013,7 @@ screen_write_combine(struct screen_write_ctx *ctx, const struct grid_cell *gc) /* * Check if we need to combine characters. This could be zero width - * (zet above), a modifier character (with an existing Unicode + * (set above), a modifier character (with an existing Unicode * character) or a previous ZWJ. */ if (!zero_width) { diff --git a/window.c b/window.c index c1365993..c16dc128 100644 --- a/window.c +++ b/window.c @@ -340,6 +340,7 @@ window_destroy(struct window *w) { log_debug("window @%u destroyed (%d references)", w->id, w->references); + window_unzoom(w); RB_REMOVE(windows, &windows, w); if (w->layout_root != NULL) -- cgit v1.2.3 From fdf465925e9b3cdd90c15a2f7fb475397f51b993 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 30 Oct 2023 16:05:30 +0000 Subject: Do not allow combined UTF-8 characters that are too long, GitHub issue 3729. --- screen-write.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/screen-write.c b/screen-write.c index 01632f61..ff758a17 100644 --- a/screen-write.c +++ b/screen-write.c @@ -2025,6 +2025,10 @@ screen_write_combine(struct screen_write_ctx *ctx, const struct grid_cell *gc) return (0); } + /* Check if this combined character would be too long. */ + if (last.data.size + ud->size > sizeof last.data.data) + return (0); + /* Combining; flush any pending output. */ screen_write_collect_flush(ctx, 0, __func__); -- cgit v1.2.3 From 5aadee6df4750a4c428fc7e7edc9e8e315c3f610 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 2 Nov 2023 10:38:14 +0000 Subject: next-prompt can have 1 argument. --- window-copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/window-copy.c b/window-copy.c index 6f233077..bc3713b0 100644 --- a/window-copy.c +++ b/window-copy.c @@ -2719,7 +2719,7 @@ static const struct { }, { .command = "next-prompt", .minargs = 0, - .maxargs = 0, + .maxargs = 1, .clear = WINDOW_COPY_CMD_CLEAR_ALWAYS, .f = window_copy_cmd_next_prompt }, -- cgit v1.2.3