diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-10-08 17:11:47 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-10-08 17:58:35 -0400 |
commit | 573567aef6c62728378394af9767ecf65622ea42 (patch) | |
tree | 485e1be85b48dbb23368dba6e1fa90fbbad1fc71 | |
parent | c64d6702e5027e494f602094c381dfb9a935608d (diff) | |
download | rneovim-573567aef6c62728378394af9767ecf65622ea42.tar.gz rneovim-573567aef6c62728378394af9767ecf65622ea42.tar.bz2 rneovim-573567aef6c62728378394af9767ecf65622ea42.zip |
vim-patch:8.1.0463: "simalt ~x" in .vimrc blocks swap file prompt
Problem: "simalt ~x" in .vimrc blocks swap file prompt.
Solution: Flush buffers before prompting. (Yasuhiro Matsumoto,
closes vim/vim#3518, closes vim/vim#2192)
https://github.com/vim/vim/commit/798184cc67036285a24b38c0bf6668d4d1525548
-rw-r--r-- | src/nvim/memline.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c index ec0238e7c9..712ed0f29f 100644 --- a/src/nvim/memline.c +++ b/src/nvim/memline.c @@ -49,6 +49,7 @@ #include "nvim/buffer.h" #include "nvim/cursor.h" #include "nvim/eval.h" +#include "nvim/getchar.h" #include "nvim/fileio.h" #include "nvim/func_attr.h" #include "nvim/main.h" @@ -3358,12 +3359,16 @@ static char *findswapname(buf_T *buf, char **dirp, char *old_fname, choice = do_swapexists(buf, (char_u *) fname); if (choice == 0) { - /* Show info about the existing swap file. */ + // Show info about the existing swap file. attention_message(buf, (char_u *) fname); - /* We don't want a 'q' typed at the more-prompt - * interrupt loading a file. */ + // We don't want a 'q' typed at the more-prompt + // interrupt loading a file. got_int = FALSE; + + // If vimrc has "simalt ~x" we don't want it to + // interfere with the prompt here. + flush_buffers(TRUE); } if (swap_exists_action != SEA_NONE && choice == 0) { |