summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0499
diff options
context:
space:
mode:
authorSam Bingner <sam@bingner.com>2018-12-13 15:11:52 -1000
committerSam Bingner <sam@bingner.com>2018-12-13 15:11:52 -1000
commit957aa75d05c00731d7112bed7b68ce4568667d0c (patch)
tree0445216818495a7864eaa3acde1a1570d34b958d /data/vim/patches/8.1.0499
parentc54a909c8b5a8519130803cf55f68603c0ad3682 (diff)
Update vim
Diffstat (limited to 'data/vim/patches/8.1.0499')
-rw-r--r--data/vim/patches/8.1.0499149
1 files changed, 149 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0499 b/data/vim/patches/8.1.0499
new file mode 100644
index 000000000..4c7ee4692
--- /dev/null
+++ b/data/vim/patches/8.1.0499
@@ -0,0 +1,149 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0499
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 8.1.0499
+Problem: :2vimgrep causes an ml_get error
+Solution: Pass tomatch pointer instead of value. (Yegappan Lakshmanan)
+Files: src/ex_getln.c, src/quickfix.c, src/testdir/test_quickfix.vim
+
+
+*** ../vim-8.1.0498/src/ex_getln.c 2018-09-30 21:43:17.187693348 +0200
+--- src/ex_getln.c 2018-10-28 14:27:29.009350706 +0100
+***************
+*** 483,488 ****
+--- 483,494 ----
+ if (search_first_line == 0)
+ // start at the original cursor position
+ curwin->w_cursor = is_state->search_start;
++ else if (search_first_line > curbuf->b_ml.ml_line_count)
++ {
++ // start after the last line
++ curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
++ curwin->w_cursor.col = MAXCOL;
++ }
+ else
+ {
+ // start at the first line in the range
+*** ../vim-8.1.0498/src/quickfix.c 2018-10-21 18:47:39.622613657 +0200
+--- src/quickfix.c 2018-10-28 14:22:29.387620432 +0100
+***************
+*** 5217,5223 ****
+ char_u *fname,
+ buf_T *buf,
+ regmmatch_T *regmatch,
+! long tomatch,
+ int duplicate_name,
+ int flags)
+ {
+--- 5217,5223 ----
+ char_u *fname,
+ buf_T *buf,
+ regmmatch_T *regmatch,
+! long *tomatch,
+ int duplicate_name,
+ int flags)
+ {
+***************
+*** 5225,5231 ****
+ long lnum;
+ colnr_T col;
+
+! for (lnum = 1; lnum <= buf->b_ml.ml_line_count && tomatch > 0; ++lnum)
+ {
+ col = 0;
+ while (vim_regexec_multi(regmatch, curwin, buf, lnum,
+--- 5225,5231 ----
+ long lnum;
+ colnr_T col;
+
+! for (lnum = 1; lnum <= buf->b_ml.ml_line_count && *tomatch > 0; ++lnum)
+ {
+ col = 0;
+ while (vim_regexec_multi(regmatch, curwin, buf, lnum,
+***************
+*** 5255,5261 ****
+ break;
+ }
+ found_match = TRUE;
+! if (--tomatch == 0)
+ break;
+ if ((flags & VGR_GLOBAL) == 0
+ || regmatch->endpos[0].lnum > 0)
+--- 5255,5261 ----
+ break;
+ }
+ found_match = TRUE;
+! if (--*tomatch == 0)
+ break;
+ if ((flags & VGR_GLOBAL) == 0
+ || regmatch->endpos[0].lnum > 0)
+***************
+*** 5464,5470 ****
+ // Try for a match in all lines of the buffer.
+ // For ":1vimgrep" look for first match only.
+ found_match = vgr_match_buflines(qi, fname, buf, &regmatch,
+! tomatch, duplicate_name, flags);
+
+ if (using_dummy)
+ {
+--- 5464,5470 ----
+ // Try for a match in all lines of the buffer.
+ // For ":1vimgrep" look for first match only.
+ found_match = vgr_match_buflines(qi, fname, buf, &regmatch,
+! &tomatch, duplicate_name, flags);
+
+ if (using_dummy)
+ {
+*** ../vim-8.1.0498/src/testdir/test_quickfix.vim 2018-10-21 18:47:39.622613657 +0200
+--- src/testdir/test_quickfix.vim 2018-10-28 14:20:59.812305616 +0100
+***************
+*** 2364,2369 ****
+--- 2364,2384 ----
+ call XvimgrepTests('l')
+ endfunc
+
++ " Test for incsearch highlighting of the :vimgrep pattern
++ " This test used to cause "E315: ml_get: invalid lnum" errors.
++ func Test_vimgrep_incsearch()
++ enew
++ set incsearch
++ call test_override("char_avail", 1)
++
++ call feedkeys(":2vimgrep assert test_quickfix.vim test_cdo.vim\<CR>", "ntx")
++ let l = getqflist()
++ call assert_equal(2, len(l))
++
++ call test_override("ALL", 0)
++ set noincsearch
++ endfunc
++
+ func XfreeTests(cchar)
+ call s:setup_commands(a:cchar)
+
+*** ../vim-8.1.0498/src/version.c 2018-10-27 14:27:17.539786667 +0200
+--- src/version.c 2018-10-28 14:22:20.871685414 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 499,
+ /**/
+
+--
+ Bravely bold Sir Robin, rode forth from Camelot,
+ He was not afraid to die, Oh Brave Sir Robin,
+ He was not at all afraid to be killed in nasty ways
+ Brave, brave, brave, brave Sir Robin.
+ "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
+
+ /// 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 ///