diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-06-13 22:30:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-13 22:30:50 +0200 |
commit | a0496e3b76e417ed718f72665d3c3f99a385367d (patch) | |
tree | 694662988cbe9228127029bfd3433c2a01c6092f /src/nvim/normal.c | |
parent | dd21cd2a4d5f94d8a01d015359d9fae2837f0612 (diff) | |
parent | 21cf4b0ce63edd3bc5185d557a6bb8610e7c67b0 (diff) | |
download | rneovim-a0496e3b76e417ed718f72665d3c3f99a385367d.tar.gz rneovim-a0496e3b76e417ed718f72665d3c3f99a385367d.tar.bz2 rneovim-a0496e3b76e417ed718f72665d3c3f99a385367d.zip |
Merge pull request #10221 from bfredl/showcmd_cursor
screen: showcmd should never move the cursor
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index f99e42e2e4..de8ff52fe1 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -3386,8 +3386,8 @@ bool add_to_showcmd(int c) void add_to_showcmd_c(int c) { - if (!add_to_showcmd(c)) - setcursor(); + add_to_showcmd(c); + setcursor(); } /* @@ -3448,18 +3448,18 @@ static void display_showcmd(void) return; } + int showcmd_row = (int)Rows - 1; + grid_puts_line_start(&default_grid, showcmd_row); + if (!showcmd_is_clear) { - grid_puts(&default_grid, showcmd_buf, (int)Rows - 1, sc_col, 0); + grid_puts(&default_grid, showcmd_buf, showcmd_row, sc_col, 0); } - /* - * clear the rest of an old message by outputting up to SHOWCMD_COLS - * spaces - */ - grid_puts(&default_grid, (char_u *)" " + len, (int)Rows - 1, + // clear the rest of an old message by outputting up to SHOWCMD_COLS spaces + grid_puts(&default_grid, (char_u *)" " + len, showcmd_row, sc_col + len, 0); - setcursor(); /* put cursor back where it belongs */ + grid_puts_line_flush(false); } /* |