diff options
author | nicm <nicm> | 2017-02-16 12:43:08 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-02-16 12:43:08 +0000 |
commit | c948c6b69764729859dcd091934f42abad2f73e6 (patch) | |
tree | dc17aa8c25209266deca20bad586131da3aedefe | |
parent | c889e113754f16de6d5d388c804864bdc2f2148a (diff) | |
download | rtmux-c948c6b69764729859dcd091934f42abad2f73e6.tar.gz rtmux-c948c6b69764729859dcd091934f42abad2f73e6.tar.bz2 rtmux-c948c6b69764729859dcd091934f42abad2f73e6.zip |
Handle insert cells when cursor at edge of screen correctly, and do a
full flush before insert.
-rw-r--r-- | grid-view.c | 2 | ||||
-rw-r--r-- | screen-write.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/grid-view.c b/grid-view.c index b84ac64e..fe096252 100644 --- a/grid-view.c +++ b/grid-view.c @@ -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/screen-write.c b/screen-write.c index f630e0c8..f0ea4c14 100644 --- a/screen-write.c +++ b/screen-write.c @@ -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); } |