diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-06 21:24:57 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-06 21:24:57 +0200 |
commit | 27321dbeedf8bb833c48b01bf18536125794f65e (patch) | |
tree | ba4cfcc45bd7fac18a6657e7f79fad113c6a5a3e /src/message.c | |
parent | ab5894638413748fcedfe28691e6c27893924520 (diff) | |
download | vim-git-27321dbeedf8bb833c48b01bf18536125794f65e.tar.gz |
patch 8.2.1147: :confirm may happen in cooked modev8.2.1147
Problem: :confirm may happen in cooked mode. (Jason Franklin)
Solution: Switch to raw mode before prompting. (Brandon Pfeifer)
Diffstat (limited to 'src/message.c')
-rw-r--r-- | src/message.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/message.c b/src/message.c index 006e648fe..a26a63798 100644 --- a/src/message.c +++ b/src/message.c @@ -3652,6 +3652,7 @@ do_dialog( char_u *hotkeys; int c; int i; + tmode_T save_tmode; #ifndef NO_CONSOLE // Don't output anything in silent mode ("ex -s") @@ -3683,6 +3684,10 @@ do_dialog( State = CONFIRM; setmouse(); + // Ensure raw mode here. + save_tmode = cur_tmode; + settmode(TMODE_RAW); + /* * Since we wait for a keypress, don't make the * user press RETURN as well afterwards. @@ -3743,6 +3748,7 @@ do_dialog( vim_free(hotkeys); } + settmode(save_tmode); State = oldState; setmouse(); --no_wait_return; |