diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-02-16 12:43:09 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-02-16 12:43:09 +0000 |
commit | 54336c124e82bc2a63c30bb7f253b32fc8a7307e (patch) | |
tree | 49576e591ac7804f5dbe40b9b9f7ba9929d91af6 /usr.bin/tmux | |
parent | d429f4814a590b56a5c18c6e61d41df59a743cb8 (diff) |
Handle insert cells when cursor at edge of screen correctly, and do a
full flush before insert.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/grid-view.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/screen-write.c | 3 |
2 files changed, 4 insertions, 3 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); diff --git a/usr.bin/tmux/screen-write.c b/usr.bin/tmux/screen-write.c index 3ec61426cb3..bb9f1b71a07 100644 --- a/usr.bin/tmux/screen-write.c +++ b/usr.bin/tmux/screen-write.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen-write.c,v 1.112 2017/02/09 10:09:14 nicm Exp $ */ +/* $OpenBSD: screen-write.c,v 1.113 2017/02/16 12:43:08 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -1260,6 +1260,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc) /* Create space for character in insert mode. */ if (s->mode & MODE_INSERT) { + screen_write_collect_flush(ctx, 0); ttyctx.num = width; tty_write(tty_cmd_insertcharacter, &ttyctx); } |