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

Re: bug? vim7, :s and newlines

Expand Messages
  • Bram Moolenaar
    ... It appears this always happens when replacing the n in the last line. I ll look into it. -- Any sufficiently advanced technology is indistinguishable
    Message 1 of 3 , Mar 31, 2006
      Vlad Sandrini wrote:

      > Hi Bram and all, I got this behaviour when I used vim7 to edit my
      > system PATH. I changed the semicolons into newlines to have a better
      > look at the entries, and when I changed back the newlins into
      > semicolons, there were two times my paths.
      > For instance, I start a freshly compiled vim7, right where the file is
      > in vim70b/src--then I type:
      > :r!ls
      > And I get:
      > 246 more lines
      > And all the files in src are there, sorted by ls. Then I change
      > newlines into some character, say, commas:
      > :%s/\n/,/
      > And I get:
      > 247 substitutions in 1 line
      > If I press a star when the cursor is on the first filename, that would
      > be the GvimExt folder, I find another GvimExt entry in the middle of
      > the line. In fact, if I change them back into lines
      > :s/,/\r/g
      > I get:
      > 493 substitutions on 1 line
      > I did a bit of compiling today and I discovered that vim7 works like
      > this since snapshot 150 of the alpha.

      It appears this always happens when replacing the "\n" in the last line.
      I'll look into it.

      --
      Any sufficiently advanced technology is indistinguishable from magic.
      Arthur C. Clarke
      Any sufficiently advanced bug is indistinguishable from a feature.
      Rich Kulawiec

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://www.ICCF.nl ///
    Your message has been successfully submitted and would be delivered to recipients shortly.