Compare commits

..

5 Commits

Author SHA1 Message Date
Thomas Adam
381c00a74e Merge branch 'obsd-master' 2023-11-02 22:58:45 +00:00
nicm
5aadee6df4 next-prompt can have 1 argument. 2023-11-02 10:38:14 +00:00
nicm
fdf465925e Do not allow combined UTF-8 characters that are too long, GitHub issue
3729.
2023-10-30 16:05:30 +00:00
nicm
36e1ac6556 Unzoom window at start of destroy so it doesn't happen later (when
destroying panes) after the layout has been freed, GitHub issue 3717.
2023-10-23 08:12:00 +00:00
nicm
ffa376edf7 Switch to tiparm_s (added in ncurses 6.4-20230424) instead of tparm,
which allows ncurses to validate the capabilities correctly.
2023-10-17 09:55:32 +00:00
3 changed files with 7 additions and 2 deletions

View File

@ -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__);

View File

@ -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
},

View File

@ -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)