diff options
author | Sam Bingner <sam@bingner.com> | 2018-12-13 15:11:52 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2018-12-13 15:11:52 -1000 |
commit | 957aa75d05c00731d7112bed7b68ce4568667d0c (patch) | |
tree | 0445216818495a7864eaa3acde1a1570d34b958d /data/vim/patches/8.1.0511 | |
parent | c54a909c8b5a8519130803cf55f68603c0ad3682 (diff) |
Update vim
Diffstat (limited to 'data/vim/patches/8.1.0511')
-rw-r--r-- | data/vim/patches/8.1.0511 | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0511 b/data/vim/patches/8.1.0511 new file mode 100644 index 000000000..52ee8ab7a --- /dev/null +++ b/data/vim/patches/8.1.0511 @@ -0,0 +1,77 @@ +To: vim_dev@googlegroups.com +Subject: Patch 8.1.0511 +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.0511 +Problem: ml_get error when calling a function with a range. +Solution: Don't position the cursor after the last line. +Files: src/userfunc.c, src/testdir/test_functions.vim + + +*** ../vim-8.1.0510/src/userfunc.c 2018-10-25 13:31:33.833906872 +0200 +--- src/userfunc.c 2018-11-04 23:38:59.813826045 +0100 +*************** +*** 3149,3154 **** +--- 3149,3161 ---- + { + if (!eap->skip && eap->addr_count > 0) + { ++ if (lnum > curbuf->b_ml.ml_line_count) ++ { ++ // If the function deleted lines or switched to another buffer ++ // the line number may become invalid. ++ EMSG(_(e_invrange)); ++ break; ++ } + curwin->w_cursor.lnum = lnum; + curwin->w_cursor.col = 0; + #ifdef FEAT_VIRTUALEDIT +*** ../vim-8.1.0510/src/testdir/test_functions.vim 2018-10-07 18:43:02.524682045 +0200 +--- src/testdir/test_functions.vim 2018-11-04 23:33:21.703374164 +0100 +*************** +*** 1119,1121 **** +--- 1119,1140 ---- + call assert_fails('call Fsandbox()', 'E48:') + delfunc Fsandbox + endfunc ++ ++ func EditAnotherFile() ++ let word = expand('<cword>') ++ edit Xfuncrange2 ++ endfunc ++ ++ func Test_func_range_with_edit() ++ " Define a function that edits another buffer, then call it with a range that ++ " is invalid in that buffer. ++ call writefile(['just one line'], 'Xfuncrange2') ++ new ++ call setline(1, range(10)) ++ write Xfuncrange1 ++ call assert_fails('5,8call EditAnotherFile()', 'E16:') ++ ++ call delete('Xfuncrange1') ++ call delete('Xfuncrange2') ++ bwipe! ++ endfunc +*** ../vim-8.1.0510/src/version.c 2018-11-04 14:40:42.347139567 +0100 +--- src/version.c 2018-11-04 23:36:30.146573147 +0100 +*************** +*** 794,795 **** +--- 794,797 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 511, + /**/ + +-- +Proverb: A nightingale that forgets the lyrics is a hummingbird. + + /// 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 /// |