diff options
author | glacambre <code@lacamb.re> | 2021-02-09 13:26:52 +0100 |
---|---|---|
committer | glacambre <code@lacamb.re> | 2021-02-10 13:04:02 +0100 |
commit | dbf3c5d953ee9143494aa88b1aeb849d34ca64dd (patch) | |
tree | eb83a63c82b70bc7d2f84240d3193b0de346c5a9 /src | |
parent | 00423730b5eddc628a4b996b9e226fe23d7ce1f2 (diff) | |
download | rneovim-dbf3c5d953ee9143494aa88b1aeb849d34ca64dd.tar.gz rneovim-dbf3c5d953ee9143494aa88b1aeb849d34ca64dd.tar.bz2 rneovim-dbf3c5d953ee9143494aa88b1aeb849d34ca64dd.zip |
Clear prompt_for_number messages
This fixes issues in GUIs:
https://github.com/akiyosi/goneovim/issues/94
https://github.com/glacambre/firenvim/issues/448
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/spell.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index fd1e01395a..55f9594de2 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -112,6 +112,7 @@ #include "nvim/strings.h" #include "nvim/syntax.h" #include "nvim/undo.h" +#include "nvim/ui.h" #include "nvim/os/os.h" #include "nvim/os/input.h" @@ -2889,8 +2890,14 @@ void spell_suggest(int count) msg_col = 0; // Ask for choice. selected = prompt_for_number(&mouse_used); - if (mouse_used) + + if (ui_has(kUIMessages)) { + ui_call_msg_clear(); + } + + if (mouse_used) { selected -= lines_left; + } lines_left = Rows; // avoid more prompt // don't delay for 'smd' in normal_cmd() msg_scroll = msg_scroll_save; |