To: vim_dev@googlegroups.com Subject: Patch 8.0.1672 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1672 Problem: Error during completion causes command to be cancelled. Solution: Reset did_emsg before waiting for another character. (Tom M.) Files: src/ex_getln.c, src/testdir/test_cmdline.vim *** ../vim-8.0.1671/src/ex_getln.c 2018-03-29 15:55:30.870510215 +0200 --- src/ex_getln.c 2018-04-07 19:00:20.534336924 +0200 *************** *** 426,431 **** --- 426,435 ---- #endif quit_more = FALSE; /* reset after CTRL-D which had a more-prompt */ + did_emsg = FALSE; /* There can't really be a reason why an error + that occurs while typing a command should + cause the command not to be executed. */ + cursorcmd(); /* set the cursor on the right spot */ /* Get a character. Ignore K_IGNORE and K_NOP, they should not do *** ../vim-8.0.1671/src/testdir/test_cmdline.vim 2018-03-29 15:55:30.874510195 +0200 --- src/testdir/test_cmdline.vim 2018-04-07 18:59:42.646552205 +0200 *************** *** 316,321 **** --- 316,332 ---- call feedkeys(":\etoupper(getline(1))\\\"\", '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 \%Xtestfile\", 'tx') + catch /^Vim\%((\a\+)\)\=:E32/ + " ignore error E32 + endtry + call assert_equal("Xtestfile", bufname("%")) + bwipe! endfunc func Test_remove_char_in_cmdline() *** ../vim-8.0.1671/src/version.c 2018-04-07 13:22:15.566979906 +0200 --- src/version.c 2018-04-07 19:03:43.053198295 +0200 *************** *** 764,765 **** --- 764,767 ---- { /* Add new patch number below this line */ + /**/ + 1672, /**/ -- ~ ~ ~ ".signature" 4 lines, 50 characters written /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///