summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2023-11-02 22:58:45 +0000
committerThomas Adam <thomas@xteddy.org>2023-11-02 22:58:45 +0000
commit381c00a74ea1eb136a97c86da9a7713190b10a62 (patch)
tree03a9f8bd56a65cff8c7c8be340fdd6e8e8600240
parenta5545dbc9f576d8f324333942eda562f3b80beeb (diff)
parent5aadee6df4750a4c428fc7e7edc9e8e315c3f610 (diff)
Merge branch 'obsd-master'
-rw-r--r--screen-write.c6
-rw-r--r--window-copy.c2
-rw-r--r--window.c1
3 files changed, 7 insertions, 2 deletions
diff --git a/screen-write.c b/screen-write.c
index 923dac6e..6892d041 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -2110,7 +2110,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) {
@@ -2122,6 +2122,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__);
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
},
diff --git a/window.c b/window.c
index 84a32393..81d0f809 100644
--- a/window.c
+++ b/window.c
@@ -338,6 +338,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)