diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-16 16:22:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2020-05-16 16:22:02 +0000 |
commit | 9f1d36e75198bfe239a9de0341cb6ca40d4902c9 (patch) | |
tree | ece783c2151694659225643b7d2aab2c40b00066 /usr.bin/tmux/grid.c | |
parent | 40cf1ab9daf002bd661e82a40e95176c69ed3c59 (diff) |
Add screen write flags instead of individual bits and fix line length
calculation with padding.
Diffstat (limited to 'usr.bin/tmux/grid.c')
-rw-r--r-- | usr.bin/tmux/grid.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/grid.c b/usr.bin/tmux/grid.c index 6495da31f22..3c36d359603 100644 --- a/usr.bin/tmux/grid.c +++ b/usr.bin/tmux/grid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grid.c,v 1.108 2020/05/16 15:49:20 nicm Exp $ */ +/* $OpenBSD: grid.c,v 1.109 2020/05/16 16:22:01 nicm Exp $ */ /* * Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1391,7 +1391,9 @@ grid_line_length(struct grid *gd, u_int py) px = gd->sx; while (px > 0) { grid_get_cell(gd, px - 1, py, &gc); - if (gc.data.size != 1 || *gc.data.data != ' ') + if ((gc.flags & GRID_FLAG_PADDING) || + gc.data.size != 1 || + *gc.data.data != ' ') break; px--; } |