mirror of
https://github.com/tmux/tmux.git
synced 2026-04-16 03:56:28 +00:00
When a cell is cleared after having been moved, we cannot reuse its
extended data, because that may still be in use. Add a flag to grid_clear_cell to indicate this. Fixes irritating problems with ICH (CSI @) mostly visible in emacs.
This commit is contained in:
5
screen.c
5
screen.c
@@ -760,8 +760,9 @@ screen_mode_to_string(int mode)
|
||||
return (tmp);
|
||||
}
|
||||
|
||||
/* Convert screen to a string. */
|
||||
const char *
|
||||
screen_print(struct screen *s)
|
||||
screen_print(struct screen *s, int line)
|
||||
{
|
||||
static char *buf;
|
||||
static size_t len = 16384;
|
||||
@@ -777,6 +778,8 @@ screen_print(struct screen *s)
|
||||
buf = xmalloc(len);
|
||||
|
||||
for (y = 0; y < screen_hsize(s) + s->grid->sy; y++) {
|
||||
if (line >= 0 && y != (u_int)line)
|
||||
continue;
|
||||
n = snprintf(buf + last, len - last, "%.4d \"", y);
|
||||
if (n <= 0 || (u_int)n >= len - last)
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user