To: vim_dev@googlegroups.com Subject: Patch 9.0.1299 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1299 (after 9.0.1298) Problem: Change for triggering incsearch not sufficiently tested. Solution: Add a test case. Simplify the code. (closes #11971) Files: src/ex_getln.c, src/testdir/test_autocmd.vim *** ../vim-9.0.1298/src/ex_getln.c 2023-02-10 21:38:26.113444491 +0000 --- src/ex_getln.c 2023-02-11 10:29:09.274972178 +0000 *************** *** 1253,1261 **** // remove the double quote redrawcmd(); ! // The text has been stuffed, the command line didn't change yet, but it ! // will change soon. The caller must take care of it. ! return literally ? CMDLINE_NOT_CHANGED : CMDLINE_CHANGED; } /* --- 1253,1261 ---- // remove the double quote redrawcmd(); ! // With "literally": the command line has already changed. ! // Else: the text has been stuffed, but the command line didn't change yet. ! return literally ? CMDLINE_CHANGED : CMDLINE_NOT_CHANGED; } /* *************** *** 2086,2095 **** res = cmdline_insert_reg(&gotesc); if (res == GOTO_NORMAL_MODE) goto returncmd; ! #ifdef FEAT_SEARCH_EXTRA ! if (res == CMDLINE_NOT_CHANGED) ! is_state.incsearch_postponed = TRUE; ! #endif goto cmdline_not_changed; case Ctrl_D: --- 2086,2093 ---- res = cmdline_insert_reg(&gotesc); if (res == GOTO_NORMAL_MODE) goto returncmd; ! if (res == CMDLINE_CHANGED) ! goto cmdline_changed; goto cmdline_not_changed; case Ctrl_D: *** ../vim-9.0.1298/src/testdir/test_autocmd.vim 2023-02-06 20:58:03.436471937 +0000 --- src/testdir/test_autocmd.vim 2023-02-11 10:29:09.278972171 +0000 *************** *** 1909,1925 **** call assert_equal(':', g:entered) au! CmdlineChanged let g:log = [] cnoremap call setcmdline('ls') - autocmd CmdlineChanged : let g:log += [getcmdline()] call feedkeys(":\", 'xt') call assert_equal(['ls'], g:log) - unlet g:log - au! CmdlineChanged cunmap let g:log = [] - autocmd CmdlineChanged : let g:log += [getcmdline()] call feedkeys(":sign \\\\\\\", 'xt') call assert_equal([ \ 's', --- 1909,1923 ---- call assert_equal(':', g:entered) au! CmdlineChanged + autocmd CmdlineChanged : let g:log += [getcmdline()] + let g:log = [] cnoremap call setcmdline('ls') call feedkeys(":\", 'xt') call assert_equal(['ls'], g:log) cunmap let g:log = [] call feedkeys(":sign \\\\\\\", 'xt') call assert_equal([ \ 's', *************** *** 1950,1955 **** --- 1948,1969 ---- \ 'sign unplace', \ ], g:log) set wildmenu& wildoptions& + + let g:log = [] + let @r = 'abc' + call feedkeys(":0\r1\\r2\\r3\", 'xt') + call assert_equal([ + \ '0', + \ '0a', + \ '0ab', + \ '0abc', + \ '0abc1', + \ '0abc1abc', + \ '0abc1abc2', + \ '0abc1abc2abc', + \ '0abc1abc2abc3', + \ ], g:log) + unlet g:log au! CmdlineChanged *** ../vim-9.0.1298/src/version.c 2023-02-10 21:38:26.113444491 +0000 --- src/version.c 2023-02-11 10:31:09.951122096 +0000 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1299, /**/ -- hundred-and-one symptoms of being an internet addict: 113. You are asked about a bus schedule, you wonder if it is 16 or 32 bits. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///