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

[patch] fix matching [^\n] matching newlines

Expand Messages
  • Christian Brabandt
    Bram, this patch fixes this item from the todo list: /[^ n] does match at a line break. Expected to do the same as /. Vim now handles /[^ n] exactly like
    Message 1 of 4 , Nov 30, 2012
    • 0 Attachment
      Bram,
      this patch fixes this item from the todo list:

      /[^\n] does match at a line break. Expected to do the same as /.

      Vim now handles /[^\n] exactly like matching the '.'

      While making this patch, I noticed, that currently echo match("\n", '.')
      returns true. This might be unexpected, since '.' shouldn't match
      newlines I guess. But changing this would be an incomptabile change,
      since otherwise A^@A or A^MA wouldn't match anymore and I guess, this
      wouldn't not be intended. So I left it untouched.

      But it should probably be documented somewhere.

      BTW, hg seems to handle the testfiles as binary files (probably because
      of the NUL in there). I hope this doesn't cause problems applying it,
      but if it does, I can mail you the 2 complete files.

      regards,
      Christian

      --
      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
    • Bram Moolenaar
      ... Thanks, I ll update the todo list. ... Let s not make changes that might cause some scripts to fail in unexpected ways. ... Yes. ... Hmm, I don t know how
      Message 2 of 4 , Dec 1, 2012
      • 0 Attachment
        Christian Brabandt wrote:

        > this patch fixes this item from the todo list:
        >
        > /[^\n] does match at a line break. Expected to do the same as /.
        >
        > Vim now handles /[^\n] exactly like matching the '.'

        Thanks, I'll update the todo list.

        > While making this patch, I noticed, that currently echo match("\n", '.')
        > returns true. This might be unexpected, since '.' shouldn't match
        > newlines I guess. But changing this would be an incomptabile change,
        > since otherwise A^@A or A^MA wouldn't match anymore and I guess, this
        > wouldn't not be intended. So I left it untouched.

        Let's not make changes that might cause some scripts to fail in
        unexpected ways.

        > But it should probably be documented somewhere.

        Yes.

        > BTW, hg seems to handle the testfiles as binary files (probably because
        > of the NUL in there). I hope this doesn't cause problems applying it,
        > but if it does, I can mail you the 2 complete files.

        Hmm, I don't know how to apply that binary patch, but perhaps "patch"
        knows. Anyway, if you can send those files in a zip'ed attachment it
        will certainly work.

        --
        From "know your smileys":
        %-) After staring at screen for 15 hours

        /// 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
      • Christian Brabandt
        Hi Bram! ... hg import at least can handle it. But anyhow, here is the tarfile of the changed test79 files. regards, Christian -- Wie man sein Kind nicht
        Message 3 of 4 , Dec 1, 2012
        • 0 Attachment
          Hi Bram!

          On Sa, 01 Dez 2012, Bram Moolenaar wrote:

          > Hmm, I don't know how to apply that binary patch, but perhaps "patch"
          > knows. Anyway, if you can send those files in a zip'ed attachment it
          > will certainly work.

          hg import at least can handle it. But anyhow, here is the tarfile of the
          changed test79 files.

          regards,
          Christian
          --
          Wie man sein Kind nicht nennen sollte:
          Hans A. Plast

          --
          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
        • Bram Moolenaar
          ... Thanks! -- I AM THANKFUL... ...for the mess to clean after a party because it means I have been surrounded by friends. /// Bram Moolenaar --
          Message 4 of 4 , Dec 2, 2012
          • 0 Attachment
            Christian Brabandt wrote:

            > On Sa, 01 Dez 2012, Bram Moolenaar wrote:
            >
            > > Hmm, I don't know how to apply that binary patch, but perhaps "patch"
            > > knows. Anyway, if you can send those files in a zip'ed attachment it
            > > will certainly work.
            >
            > hg import at least can handle it. But anyhow, here is the tarfile of the
            > changed test79 files.

            Thanks!

            --
            I AM THANKFUL...
            ...for the mess to clean after a party because it means I have
            been surrounded by friends.

            /// 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
          Your message has been successfully submitted and would be delivered to recipients shortly.