diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-06-04 21:41:32 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-06-04 21:41:32 +0000 |
commit | cf20b1bb625718ce3524340601834657df7df343 (patch) | |
tree | a81065e3acd463cdcda881a4a748587984eb9b81 /usr.bin/tmux | |
parent | 6bc9d294aea0d1a68cdcee9c721fbb454adaa007 (diff) |
Reset wrapped flag when clearing or moving lines, GitHub issue 2215.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/grid.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c index c095463dc96..44d14af15bd 100644 --- a/usr.bin/tmux/grid.c +++ b/usr.bin/tmux/grid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grid.c,v 1.116 2020/06/02 20:51:46 nicm Exp $ */ +/* $OpenBSD: grid.c,v 1.117 2020/06/04 21:41:31 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -649,6 +649,8 @@ grid_clear_lines(struct grid *gd, u_int py, u_int ny, u_int bg) grid_free_line(gd, yy); grid_empty_line(gd, yy, bg); } + if (py != 0) + gd->linedata[py - 1].flags &= ~GRID_LINE_WRAPPED; } /* Move a group of lines. */ @@ -675,6 +677,8 @@ grid_move_lines(struct grid *gd, u_int dy, u_int py, u_int ny, u_int bg) continue; grid_free_line(gd, yy); } + if (dy != 0) + gd->linedata[dy - 1].flags &= ~GRID_LINE_WRAPPED; memmove(&gd->linedata[dy], &gd->linedata[py], ny * (sizeof *gd->linedata)); @@ -687,8 +691,11 @@ grid_move_lines(struct grid *gd, u_int dy, u_int py, u_int ny, u_int bg) if (yy < dy || yy >= dy + ny) grid_empty_line(gd, yy, bg); } + if (py != 0 && (py < dy || py >= dy + ny)) + gd->linedata[py - 1].flags &= ~GRID_LINE_WRAPPED; } + /* Move a group of cells. */ void grid_move_cells(struct grid *gd, u_int dx, u_int px, u_int py, u_int nx, |