patch 8.0.1672: error during completion causes command to be cancelled
Problem: Error during completion causes command to be cancelled.
Solution: Reset did_emsg before waiting for another character. (Tom M.)
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 8755fbf..ff0756c 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -316,6 +316,17 @@
call feedkeys(":\<C-\>etoupper(getline(1))\<CR>\<C-B>\"\<CR>", 'tx')
call assert_equal('"ASDF.X /TMP/SOME VERYLONGWORD A;B-C*D ', @:)
bwipe!
+
+ " Error while typing a command used to cause that it was not executed
+ " in the end.
+ new
+ try
+ call feedkeys(":file \<C-R>%Xtestfile\<CR>", 'tx')
+ catch /^Vim\%((\a\+)\)\=:E32/
+ " ignore error E32
+ endtry
+ call assert_equal("Xtestfile", bufname("%"))
+ bwipe!
endfunc
func Test_remove_char_in_cmdline()