diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-09-13 12:56:30 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-09-15 12:13:43 +0200 |
commit | 708bd686516b420c2b65f4bc4d2c58fe43fb945e (patch) | |
tree | dceae7b5fc616d7cfec138e5291d664ec7ba451e /src/nvim/getchar.c | |
parent | bf6de51f55c1b812342c7d4e88c65a7cae7fe97f (diff) | |
download | rneovim-708bd686516b420c2b65f4bc4d2c58fe43fb945e.tar.gz rneovim-708bd686516b420c2b65f4bc4d2c58fe43fb945e.tar.bz2 rneovim-708bd686516b420c2b65f4bc4d2c58fe43fb945e.zip |
feat(ui): use msg_grid based implementation for cmdheight=0
Diffstat (limited to 'src/nvim/getchar.c')
-rw-r--r-- | src/nvim/getchar.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index c7cfc91591..c93810df8d 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1655,9 +1655,10 @@ static void getchar_common(typval_T *argvars, typval_T *rettv) no_mapping++; allow_keys++; for (;;) { - // Position the cursor. Needed after a message that ends in a space, - // or if event processing caused a redraw. - ui_cursor_goto(msg_row, msg_col); + if (msg_col > 0) { + // Position the cursor. Needed after a message that ends in a space. + ui_cursor_goto(msg_row, msg_col); + } if (argvars[0].v_type == VAR_UNKNOWN) { // getchar(): blocking wait. @@ -1695,12 +1696,6 @@ static void getchar_common(typval_T *argvars, typval_T *rettv) no_mapping--; allow_keys--; - if (!ui_has_messages()) { - // redraw the screen after getchar() - update_screen(UPD_NOT_VALID); - clear_cmdline = true; - } - set_vim_var_nr(VV_MOUSE_WIN, 0); set_vim_var_nr(VV_MOUSE_WINID, 0); set_vim_var_nr(VV_MOUSE_LNUM, 0); |