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:
nicm 2016-10-09 07:30:28 +00:00
parent 30086e504c
commit 44449b305b

View File

@ -1288,7 +1288,8 @@ window_copy_write_line(struct window_pane *wp, struct screen_write_ctx *ctx,
xoff = size = xsnprintf(hdr, limit,
"Repeat: %d", data->numprefix);
} else {
xoff = size = xsnprintf(hdr, limit,
/* We don't care about truncation. */
xoff = size = snprintf(hdr, limit,
"%s: %s", data->inputprompt, data->inputstr);
}
screen_write_cursormove(ctx, 0, last);