summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0555
diff options
context:
space:
mode:
Diffstat (limited to 'data/vim/patches/8.1.0555')
-rw-r--r--data/vim/patches/8.1.055574
1 files changed, 74 insertions, 0 deletions
diff --git a/data/vim/patches/8.1.0555 b/data/vim/patches/8.1.0555
new file mode 100644
index 000000000..c6cfaf99a
--- /dev/null
+++ b/data/vim/patches/8.1.0555
@@ -0,0 +1,74 @@
+To: vim_dev@googlegroups.com
+Subject: Patch 8.1.0555
+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.0555
+Problem: Crash when last search pat is set but not last substitute pat.
+Solution: Do not mix up last search pattern and last subtitute pattern.
+ (closes #3647)
+Files: src/search.c, src/testdir/test_search.vim
+
+
+*** ../vim-8.1.0554/src/search.c 2018-11-30 21:57:50.723861874 +0100
+--- src/search.c 2018-12-01 13:09:58.124716701 +0100
+***************
+*** 1385,1391 ****
+ char_u *trunc;
+
+ if (*searchstr == NUL)
+! p = spats[last_idx].pat;
+ else
+ p = searchstr;
+ msgbuf = alloc((unsigned)(STRLEN(p) + 40));
+--- 1385,1391 ----
+ char_u *trunc;
+
+ if (*searchstr == NUL)
+! p = spats[0].pat;
+ else
+ p = searchstr;
+ msgbuf = alloc((unsigned)(STRLEN(p) + 40));
+*** ../vim-8.1.0554/src/testdir/test_search.vim 2018-09-16 17:07:40.125853848 +0200
+--- src/testdir/test_search.vim 2018-12-01 13:11:24.096343712 +0100
+***************
+*** 1142,1144 ****
+--- 1142,1156 ----
+ /\%'(
+ /
+ endfunc
++
++ " Test that there is no crash when there is a last search pattern but no last
++ " substitute pattern.
++ func Test_no_last_substitute_pat()
++ " Use viminfo to set the last search pattern to a string and make the last
++ " substitute pattern the most recent used and make it empty (NULL).
++ call writefile(['~MSle0/bar', '~MSle0~&'], 'Xviminfo')
++ rviminfo! Xviminfo
++ call assert_fails('normal n', 'E35:')
++
++ call delete('Xviminfo')
++ endfunc
+*** ../vim-8.1.0554/src/version.c 2018-12-01 11:58:44.415064948 +0100
+--- src/version.c 2018-12-01 13:11:33.232302706 +0100
+***************
+*** 794,795 ****
+--- 794,797 ----
+ { /* Add new patch number below this line */
++ /**/
++ 555,
+ /**/
+
+--
+"I love deadlines. I especially like the whooshing sound they
+make as they go flying by."
+ -- Douglas Adams
+
+ /// 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 ///