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