Patch 8.1.0887
Problem: The 'l' flag in :subsitute is sticky.
Solution: Reset the flag. (Dominique Pelle, closes #3925)
Files: src/ex_cmds.c, src/testdir/test_substitute.vim
*** ../vim-8.1.0886/src/ex_cmds.c 2019-02-08 14:33:54.818762019 +0100
--- src/ex_cmds.c 2019-02-10 21:52:20.042996065 +0100
***************
*** 2098,2104 ****
fp_out = NULL;
# ifdef EEXIST
/* Avoid trying lots of names while the problem is lack
! * of premission, only retry if the file already
* exists. */
if (errno != EEXIST)
break;
--- 2098,2104 ----
fp_out = NULL;
# ifdef EEXIST
/* Avoid trying lots of names while the problem is lack
! * of permission, only retry if the file already
* exists. */
if (errno != EEXIST)
break;
***************
*** 5040,5045 ****
--- 5040,5046 ----
}
subflags.do_error = TRUE;
subflags.do_print = FALSE;
+ subflags.do_list = FALSE;
subflags.do_count = FALSE;
subflags.do_number = FALSE;
subflags.do_ic = 0;
*** ../vim-8.1.0886/src/testdir/test_substitute.vim 2019-01-09
23:00:58.001176090 +0100
--- src/testdir/test_substitute.vim 2019-02-10 21:52:20.042996065 +0100
***************
*** 107,112 ****
--- 107,138 ----
endfor
endfunc
+ " Test the l, p, # flags.
+ func Test_substitute_flags_lp()
+ new
+ call setline(1, "abc\tdef\<C-h>ghi")
+
+ let a = execute('s/a/a/p')
+ call assert_equal("\nabc def^Hghi", a)
+
+ let a = execute('s/a/a/l')
+ call assert_equal("\nabc^Idef^Hghi$", a)
+
+ let a = execute('s/a/a/#')
+ call assert_equal("\n 1 abc def^Hghi", a)
+
+ let a = execute('s/a/a/p#')
+ call assert_equal("\n 1 abc def^Hghi", a)
+
+ let a = execute('s/a/a/l#')
+ call assert_equal("\n 1 abc^Idef^Hghi$", a)
+
+ let a = execute('s/a/a/')
+ call assert_equal("", a)
+
+ bwipe!
+ endfunc
+
func Test_substitute_repeat()
" This caused an invalid memory access.
split Xfile
*** ../vim-8.1.0886/src/version.c 2019-02-10 21:48:21.385272023 +0100
--- src/version.c 2019-02-10 21:55:06.957451666 +0100
***************
*** 785,786 ****
--- 785,788 ----
{ /* Add new patch number below this line */
+ /**/
+ 887,
/**/
--
BEDEVERE: Stand by for attack!!
[CUT TO enormous army forming up. Trebuchets, rows of PIKEMEN, siege
towers, pennants flying, shouts of "Stand by for attack!" Traditional
army build-up shots. The shouts echo across the ranks of the army.
We see various groups reacting, and stirring themselves in readiness.]
ARTHUR: Who are they?
BEDEVERE: Oh, just some friends!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.