Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 287 by [email protected]: Newline substitution behaviour
https://code.google.com/p/vim/issues/detail?id=287

Since patch 7.4.232 (http://markmail.org/message/vo7ruair5raccawp), vim recognizes 's/\n//' as a special case, and transforms it into a join command.

The generated join command involves lines in command line-range. Thus, '1,3s/\n//' joins lines 1, 2, and 3, which implies it only deletes 2 newlines (not 3). Also, for the particular case of just one line, 's/\n//' does nothing. I mean, do_join gets invoked, but it does nothing in that case.

Now, another interpretation would be possible, in which the generated join should involve lines in rage plus one. This is, '1,3s/\n//' would join 4 lines, effectively deleting 3 newlines, and 's/\n//' would join current line with the next one, deleting 1 newline.

Then, my question is: Is current behaviour the canonical one, or is it a bug? Div vim previous to 7.4.232 behave the same?

Thanks.



--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui