Loading ...
Sorry, an error occurred while loading the content.

Patch 7.4.261

Expand Messages
  • Bram Moolenaar
    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
    Message 1 of 2 , Apr 23, 2014
    • 0 Attachment
      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@... -- 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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Ingo Karkat
      ... Thanks (also to Christian for the quick initial fix)! I can confirm that this fixes the issue for me. -- regards, ingo -- -- You received this message from
      Message 2 of 2 , Apr 24, 2014
      • 0 Attachment
        On 23-Apr-2014 18:49 +0200, Bram Moolenaar wrote:

        > 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

        Thanks (also to Christian for the quick initial fix)! I can confirm that
        this fixes the issue for me.

        -- regards, ingo

        --
        --
        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 vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      Your message has been successfully submitted and would be delivered to recipients shortly.