mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 13:37:12 +00:00
Use xsnprintf not snprintf for the prompt in window_copy_write_line
because we don't care if it is truncated to the screen width, we don't want it to be fatal.
This commit is contained in:
@ -1288,7 +1288,8 @@ window_copy_write_line(struct window_pane *wp, struct screen_write_ctx *ctx,
|
|||||||
xoff = size = xsnprintf(hdr, limit,
|
xoff = size = xsnprintf(hdr, limit,
|
||||||
"Repeat: %d", data->numprefix);
|
"Repeat: %d", data->numprefix);
|
||||||
} else {
|
} else {
|
||||||
xoff = size = xsnprintf(hdr, limit,
|
/* We don't care about truncation. */
|
||||||
|
xoff = size = snprintf(hdr, limit,
|
||||||
"%s: %s", data->inputprompt, data->inputstr);
|
"%s: %s", data->inputprompt, data->inputstr);
|
||||||
}
|
}
|
||||||
screen_write_cursormove(ctx, 0, last);
|
screen_write_cursormove(ctx, 0, last);
|
||||||
|
Reference in New Issue
Block a user