mirror of
https://github.com/tmux/tmux.git
synced 2024-12-04 19:58:48 +00:00
Redraw status line if size changes, GitHub issue 1762. Also fix length
of target buffer when pasting into status line.
This commit is contained in:
parent
4382538e4b
commit
580cd16f4c
6
status.c
6
status.c
@ -348,10 +348,8 @@ status_redraw(struct client *c)
|
||||
/* Resize the target screen. */
|
||||
if (screen_size_x(&sl->screen) != width ||
|
||||
screen_size_y(&sl->screen) != lines) {
|
||||
if (screen_size_x(&sl->screen) != width)
|
||||
force = 1;
|
||||
screen_resize(&sl->screen, width, lines, 0);
|
||||
changed = 1;
|
||||
changed = force = 1;
|
||||
}
|
||||
screen_write_start(&ctx, NULL, &sl->screen);
|
||||
|
||||
@ -865,7 +863,7 @@ status_prompt_paste(struct client *c)
|
||||
if ((pb = paste_get_top(NULL)) == NULL)
|
||||
return (0);
|
||||
bufdata = paste_buffer_data(pb, &bufsize);
|
||||
ud = xreallocarray(NULL, bufsize, sizeof *ud);
|
||||
ud = xreallocarray(NULL, bufsize + 1, sizeof *ud);
|
||||
udp = ud;
|
||||
for (i = 0; i != bufsize; /* nothing */) {
|
||||
more = utf8_open(udp, bufdata[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user