|
Karsten Hopp |
1e9c23 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
1e9c23 |
Subject: Patch 7.4.261
|
|
Karsten Hopp |
1e9c23 |
Fcc: outbox
|
|
Karsten Hopp |
1e9c23 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
1e9c23 |
Mime-Version: 1.0
|
|
Karsten Hopp |
1e9c23 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
1e9c23 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
1e9c23 |
------------
|
|
Karsten Hopp |
1e9c23 |
|
|
Karsten Hopp |
1e9c23 |
Patch 7.4.261
|
|
Karsten Hopp |
1e9c23 |
Problem: When updating the window involves a regexp pattern, an interactive
|
|
Karsten Hopp |
1e9c23 |
substitute to replace a "\n" with a line break fails. (Ingo
|
|
Karsten Hopp |
1e9c23 |
Karkat)
|
|
Karsten Hopp |
1e9c23 |
Solution: Set reg_line_lbr in vim_regsub() and vim_regsub_multi().
|
|
Karsten Hopp |
1e9c23 |
Files: src/regexp.c, src/testdir/test79.in, src/testdir/test79.ok
|
|
Karsten Hopp |
1e9c23 |
|
|
Karsten Hopp |
1e9c23 |
|
|
Karsten Hopp |
1e9c23 |
*** ../vim-7.4.260/src/regexp.c 2014-04-06 21:33:39.671363743 +0200
|
|
Karsten Hopp |
1e9c23 |
--- src/regexp.c 2014-04-23 18:40:37.094866280 +0200
|
|
Karsten Hopp |
1e9c23 |
***************
|
|
Karsten Hopp |
1e9c23 |
*** 7381,7386 ****
|
|
Karsten Hopp |
1e9c23 |
--- 7381,7387 ----
|
|
Karsten Hopp |
1e9c23 |
reg_mmatch = NULL;
|
|
Karsten Hopp |
1e9c23 |
reg_maxline = 0;
|
|
Karsten Hopp |
1e9c23 |
reg_buf = curbuf;
|
|
Karsten Hopp |
1e9c23 |
+ reg_line_lbr = TRUE;
|
|
Karsten Hopp |
1e9c23 |
return vim_regsub_both(source, dest, copy, magic, backslash);
|
|
Karsten Hopp |
1e9c23 |
}
|
|
Karsten Hopp |
1e9c23 |
#endif
|
|
Karsten Hopp |
1e9c23 |
***************
|
|
Karsten Hopp |
1e9c23 |
*** 7400,7405 ****
|
|
Karsten Hopp |
1e9c23 |
--- 7401,7407 ----
|
|
Karsten Hopp |
1e9c23 |
reg_buf = curbuf; /* always works on the current buffer! */
|
|
Karsten Hopp |
1e9c23 |
reg_firstlnum = lnum;
|
|
Karsten Hopp |
1e9c23 |
reg_maxline = curbuf->b_ml.ml_line_count - lnum;
|
|
Karsten Hopp |
1e9c23 |
+ reg_line_lbr = FALSE;
|
|
Karsten Hopp |
1e9c23 |
return vim_regsub_both(source, dest, copy, magic, backslash);
|
|
Karsten Hopp |
1e9c23 |
}
|
|
Karsten Hopp |
1e9c23 |
|
|
Karsten Hopp |
1e9c23 |
*** ../vim-7.4.260/src/testdir/test79.in 2014-04-02 19:00:53.043644100 +0200
|
|
Karsten Hopp |
1e9c23 |
--- src/testdir/test79.in 2014-04-23 18:36:29.158872254 +0200
|
|
Karsten Hopp |
1e9c23 |
***************
|
|
Karsten Hopp |
1e9c23 |
*** 1,6 ****
|
|
Karsten Hopp |
1e9c23 |
--- 1,7 ----
|
|
Karsten Hopp |
1e9c23 |
Test for *sub-replace-special* and *sub-replace-expression* on :substitute.
|
|
Karsten Hopp |
1e9c23 |
Test for submatch() on :substitue.
|
|
Karsten Hopp |
1e9c23 |
Test for *:s%* on :substitute.
|
|
Karsten Hopp |
1e9c23 |
+ Test for :s replacing \n with line break.
|
|
Karsten Hopp |
1e9c23 |
|
|
Karsten Hopp |
1e9c23 |
STARTTEST
|
|
Karsten Hopp |
1e9c23 |
:so small.vim
|
|
Karsten Hopp |
1e9c23 |
***************
|
|
Karsten Hopp |
1e9c23 |
*** 234,239 ****
|
|
Karsten Hopp |
1e9c23 |
--- 235,254 ----
|
|
Karsten Hopp |
1e9c23 |
Q
|
|
Karsten Hopp |
1e9c23 |
|
|
Karsten Hopp |
1e9c23 |
STARTTEST
|
|
Karsten Hopp |
1e9c23 |
+ :function! TitleString()
|
|
Karsten Hopp |
1e9c23 |
+ let check = 'foo' =~ 'bar'
|
|
Karsten Hopp |
1e9c23 |
+ return ""
|
|
Karsten Hopp |
1e9c23 |
+ endfunction
|
|
Karsten Hopp |
1e9c23 |
+ :set titlestring=%{TitleString()}
|
|
Karsten Hopp |
1e9c23 |
+ :/^test_one/s/.*/\="foo\nbar"/
|
|
Karsten Hopp |
1e9c23 |
+ :/^test_two/s/.*/\="foo\nbar"/c
|
|
Karsten Hopp |
1e9c23 |
+ y
|
|
Karsten Hopp |
1e9c23 |
+ ENDTEST
|
|
Karsten Hopp |
1e9c23 |
+
|
|
Karsten Hopp |
1e9c23 |
+ test_one
|
|
Karsten Hopp |
1e9c23 |
+ test_two
|
|
Karsten Hopp |
1e9c23 |
+
|
|
Karsten Hopp |
1e9c23 |
+ STARTTEST
|
|
Karsten Hopp |
1e9c23 |
:g/^STARTTEST/.,/^ENDTEST/d
|
|
Karsten Hopp |
1e9c23 |
:1;/^Results/,$wq! test.out
|
|
Karsten Hopp |
1e9c23 |
:call getchar()
|
|
Karsten Hopp |
1e9c23 |
*** ../vim-7.4.260/src/testdir/test79.ok 2014-04-02 19:00:53.043644100 +0200
|
|
Karsten Hopp |
1e9c23 |
--- src/testdir/test79.ok 2014-04-23 18:35:30.650873664 +0200
|
|
Karsten Hopp |
1e9c23 |
***************
|
|
Karsten Hopp |
1e9c23 |
*** 126,128 ****
|
|
Karsten Hopp |
1e9c23 |
--- 126,134 ----
|
|
Karsten Hopp |
1e9c23 |
Q
|
|
Karsten Hopp |
1e9c23 |
Q
|
|
Karsten Hopp |
1e9c23 |
|
|
Karsten Hopp |
1e9c23 |
+
|
|
Karsten Hopp |
1e9c23 |
+ foo
|
|
Karsten Hopp |
1e9c23 |
+ bar
|
|
Karsten Hopp |
1e9c23 |
+ foo
|
|
Karsten Hopp |
1e9c23 |
+ bar
|
|
Karsten Hopp |
1e9c23 |
+
|
|
Karsten Hopp |
1e9c23 |
*** ../vim-7.4.260/src/version.c 2014-04-23 17:43:37.366948683 +0200
|
|
Karsten Hopp |
1e9c23 |
--- src/version.c 2014-04-23 18:46:45.250857408 +0200
|
|
Karsten Hopp |
1e9c23 |
***************
|
|
Karsten Hopp |
1e9c23 |
*** 736,737 ****
|
|
Karsten Hopp |
1e9c23 |
--- 736,739 ----
|
|
Karsten Hopp |
1e9c23 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
1e9c23 |
+ /**/
|
|
Karsten Hopp |
1e9c23 |
+ 261,
|
|
Karsten Hopp |
1e9c23 |
/**/
|
|
Karsten Hopp |
1e9c23 |
|
|
Karsten Hopp |
1e9c23 |
--
|
|
Karsten Hopp |
1e9c23 |
From "know your smileys":
|
|
Karsten Hopp |
1e9c23 |
!-| I-am-a-Cylon-Centurian-with-one-red-eye-bouncing-back-and-forth
|
|
Karsten Hopp |
1e9c23 |
|
|
Karsten Hopp |
1e9c23 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
1e9c23 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
1e9c23 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
1e9c23 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|