To: vim_dev@googlegroups.com Subject: Patch 8.2.2230 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2230 Problem: Vim9: insert completion runs into error. Solution: Insert colon before range. (closes #7556) Files: src/insexpand.c, src/testdir/test_vim9_cmd.vim *** ../vim-8.2.2229/src/insexpand.c 2020-12-21 19:59:04.569197722 +0100 --- src/insexpand.c 2020-12-27 17:56:17.130221653 +0100 *************** *** 1020,1026 **** #if defined(FEAT_EVAL) // Dirty hard-coded hack: remove any matchparen highlighting. ! do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|3match none|endif"); #endif // Update the screen later, before drawing the popup menu over it. --- 1020,1026 ---- #if defined(FEAT_EVAL) // Dirty hard-coded hack: remove any matchparen highlighting. ! do_cmdline_cmd((char_u *)"if exists('g:loaded_matchparen')|:3match none|endif"); #endif // Update the screen later, before drawing the popup menu over it. *** ../vim-8.2.2229/src/testdir/test_vim9_cmd.vim 2020-12-27 16:55:07.401084654 +0100 --- src/testdir/test_vim9_cmd.vim 2020-12-27 17:52:56.050811820 +0100 *************** *** 816,819 **** --- 816,838 ---- bwipe! enddef + def g:SomeComplFunc(findstart: number, base: string): any + if findstart + return 0 + else + return ['aaa', 'bbb'] + endif + enddef + + def Test_insert_complete() + # this was running into an error with the matchparen hack + new + set completefunc=SomeComplFunc + feedkeys("i\\\", 'ntx') + assert_equal('aaa', getline(1)) + + set completefunc= + bwipe! + enddef + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker *** ../vim-8.2.2229/src/version.c 2020-12-27 17:35:14.617431629 +0100 --- src/version.c 2020-12-27 17:54:18.022572709 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2230, /**/ -- If you put seven of the most talented OSS developers in a room and ask them to fix a bug in a spreadsheet program, in one week you'd have 2 new mail readers and a text-based web browser. /// 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 ///