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