From 957aa75d05c00731d7112bed7b68ce4568667d0c Mon Sep 17 00:00:00 2001 From: Sam Bingner Date: Thu, 13 Dec 2018 15:11:52 -1000 Subject: Update vim --- data/vim/patches/8.1.0274 | 166 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 data/vim/patches/8.1.0274 (limited to 'data/vim/patches/8.1.0274') diff --git a/data/vim/patches/8.1.0274 b/data/vim/patches/8.1.0274 new file mode 100644 index 000000000..d63003f4d --- /dev/null +++ b/data/vim/patches/8.1.0274 @@ -0,0 +1,166 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0274 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 8.1.0274 +Problem: 'incsearch' triggers on ":source". +Solution: Check for the whole command name. +Files: src/ex_getln.c, src/testdir/test_search.vim + + +*** ../vim-8.1.0273/src/ex_getln.c 2018-08-11 19:02:18.038566056 +0200 +--- src/ex_getln.c 2018-08-11 19:08:55.639612407 +0200 +*************** +*** 293,299 **** + // Skip over "substitute" to find the pattern separator. + for (p = cmd; ASCII_ISALPHA(*p); ++p) + ; +! if (*p != NUL) + { + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); +--- 293,302 ---- + // Skip over "substitute" to find the pattern separator. + for (p = cmd; ASCII_ISALPHA(*p); ++p) + ; +! if (*p != NUL +! && (STRNCMP(cmd, "substitute", p - cmd) == 0 +! || STRNCMP(cmd, "global", p - cmd) == 0 +! || STRNCMP(cmd, "vglobal", p - cmd) == 0)) + { + delim = *p++; + end = skip_regexp(p, delim, p_magic, NULL); +*** ../vim-8.1.0273/src/testdir/test_search.vim 2018-08-11 16:40:39.068311966 +0200 +--- src/testdir/test_search.vim 2018-08-11 19:11:57.066276471 +0200 +*************** +*** 342,367 **** + bw! + endfunc + +- func Test_search_cmdline3() +- if !exists('+incsearch') +- return +- endif +- " need to disable char_avail, +- " so that expansion of commandline works +- call test_override("char_avail", 1) +- new +- call setline(1, [' 1', ' 2 the~e', ' 3 the theother']) +- set incsearch +- 1 +- " first match +- call feedkeys("/the\\", 'tx') +- call assert_equal(' 2 the~e', getline('.')) +- " clean up +- set noincsearch +- call test_override("char_avail", 0) +- bw! +- endfunc +- + func Cmdline3_prep() + " need to disable char_avail, + " so that expansion of commandline works +--- 342,347 ---- +*************** +*** 377,382 **** +--- 357,375 ---- + bw! + endfunc + ++ func Test_search_cmdline3() ++ if !exists('+incsearch') ++ return ++ endif ++ call Cmdline3_prep() ++ 1 ++ " first match ++ call feedkeys("/the\\", 'tx') ++ call assert_equal(' 2 the~e', getline('.')) ++ ++ call Cmdline3_cleanup() ++ endfunc ++ + func Test_search_cmdline3s() + if !exists('+incsearch') + return +*************** +*** 385,390 **** +--- 378,389 ---- + 1 + call feedkeys(":%s/the\/xxx\", 'tx') + call assert_equal(' 2 xxxe', getline('.')) ++ undo ++ call feedkeys(":%subs/the\/xxx\", 'tx') ++ call assert_equal(' 2 xxxe', getline('.')) ++ undo ++ call feedkeys(":%substitute/the\/xxx\", 'tx') ++ call assert_equal(' 2 xxxe', getline('.')) + + call Cmdline3_cleanup() + endfunc +*************** +*** 397,402 **** +--- 396,404 ---- + 1 + call feedkeys(":g/the\/d\", 'tx') + call assert_equal(' 3 the theother', getline(2)) ++ undo ++ call feedkeys(":global/the\/d\", 'tx') ++ call assert_equal(' 3 the theother', getline(2)) + + call Cmdline3_cleanup() + endfunc +*************** +*** 410,415 **** +--- 412,421 ---- + call feedkeys(":v/the\/d\", 'tx') + call assert_equal(1, line('$')) + call assert_equal(' 2 the~e', getline(1)) ++ undo ++ call feedkeys(":vglobal/the\/d\", 'tx') ++ call assert_equal(1, line('$')) ++ call assert_equal(' 2 the~e', getline(1)) + + call Cmdline3_cleanup() + endfunc +*************** +*** 518,524 **** + " so that expansion of commandline works + call test_override("char_avail", 1) + new +! let @/='b' + call setline(1, [' bbvimb', '']) + set incsearch + " first match +--- 524,530 ---- + " so that expansion of commandline works + call test_override("char_avail", 1) + new +! let @/ = 'b' + call setline(1, [' bbvimb', '']) + set incsearch + " first match +*** ../vim-8.1.0273/src/version.c 2018-08-11 19:02:18.038566056 +0200 +--- src/version.c 2018-08-11 19:11:29.546478790 +0200 +*************** +*** 796,797 **** +--- 796,799 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 274, + /**/ + +-- +You can be stopped by the police for biking over 65 miles per hour. +You are not allowed to walk across a street on your hands. + [real standing laws in Connecticut, United States of America] + + /// 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 /// -- cgit v1.2.3