| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.261 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| 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 |
| |
| |
| |
| |
| |
| *** 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); |
| } |
| |
| |
| |
| |
| *** 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() |
| |
| |
| |
| *** 126,128 **** |
| --- 126,134 ---- |
| Q |
| Q |
| |
| + |
| + foo |
| + bar |
| + foo |
| + bar |
| + |
| |
| |
| |
| *** 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 /// |