summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/grid-view.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2017-02-16 12:43:08 +0000
committernicm <nicm@openbsd.org>2017-02-16 12:43:08 +0000
commit5de8917879a6558a918459d34b29ee3f1773af4d (patch)
treeebf91a0a062806c46dcd5622812517cc753ab2e1 /usr.bin/tmux/grid-view.c
parentMerge clear-history into capture-pane. (diff)
downloadwireguard-openbsd-5de8917879a6558a918459d34b29ee3f1773af4d.tar.xz
wireguard-openbsd-5de8917879a6558a918459d34b29ee3f1773af4d.zip
Handle insert cells when cursor at edge of screen correctly, and do a
full flush before insert.
Diffstat (limited to 'usr.bin/tmux/grid-view.c')
-rw-r--r--usr.bin/tmux/grid-view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/grid-view.c b/usr.bin/tmux/grid-view.c
index e95947be92c..8a30165599c 100644
--- a/usr.bin/tmux/grid-view.c
+++ b/usr.bin/tmux/grid-view.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grid-view.c,v 1.27 2017/02/08 16:45:18 nicm Exp $ */
+/* $OpenBSD: grid-view.c,v 1.28 2017/02/16 12:43:08 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -194,7 +194,7 @@ grid_view_insert_cells(struct grid *gd, u_int px, u_int py, u_int nx, u_int bg)
sx = grid_view_x(gd, gd->sx);
- if (px == sx - 1)
+ if (px >= sx - 1)
grid_clear(gd, px, py, 1, 1, bg);
else
grid_move_cells(gd, px + nx, px, py, sx - px - nx, bg);