Monday, March 6, 2017

Re: substitute issue when removing text

Hi Bryce!

On Mo, 06 Mär 2017, Bryce Orgill wrote:

> I've seen an issue lately on my Android phone which uses Termux to run Vim (ver 8.0, included patches 1-340). When I perform this command '%s/^.*:0\n//' on the lines below, I don't get what I expect. See the two following cases below. I was wondering if this is one of two things. Whether this is an issue in ver 8.0 in one of the new patches or a compiling issue through Termux. Would it be possible for one to try this command on ver 8.0 with the patches installed using vim and gvim on the Unix side. I don't see this issue in Vim 8.0 on Windows with patches 1-2, nor in Vim 7.4 on Windows, nor in Vim 7.4 on Unix.
>
> Case 1: Given buffer below has 11 lines below (last line is empty). The $ symbol below is not actual text but an EOL designator. Keep in mind that the line that contains f_07.txt has a 2 number at the end instead of a 0 so it should remain when this command is executed: '%s/^.*:0\n//g'. The actual result is all lines are deleted, expected result is the f_07.txt:2 line should not have been deleted.

correct, that is what I see with 8.0.347

> Case 2: Given buffer below has 10 lines below. The $ symbol below is not actual text but an EOL designator. Keep in mind that the line that contains f_07.txt has a 2 number at the end instead of a 0 so it should remain when this command is executed: '%s/^.*:0\n//g'. The actual result is all lines are deleted except the last one and there's two of those lines (why two?).

correct I also can confirm this expected result


Best,
Christian
--
Wenn der Mensch zu seinem Leide von heute nicht immer auch sein Leid
von gestern und morgen hinzurechnete, so wäre jedes Schicksal erträglich.
-- Robert Hamerling

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment