Tim Chase wrote:

> To replicate
> 
>   $ vi -u NONE
>   :r !jot 15
> 
> (or use `seq 15` to get the numbers 1-15 in your file)
> 
>   3GVG:g/5/d
> 
> This should delete lines 5 and 15 because they contain a "5".
> However, issueing
> 
>   gv
> 
> does not reselect the text.

For me it does.  I cannot guess why it doesn't work for you.

> If instead you have 16 numbers
> 
>   $ vim -u NONE
>   :r !jot 16
> 
> and do
> 
>   3GVGk:g/5/d
> 
> (selecting through the penultimate line, so the same text selected
> as before, followed by the same command, just with a line below '>
> containing "16") followed by
> 
>   gv
> 
> it works, adjusting the '> mark to the line containing "16".  So
> there's clearly some "the last line of my visual range was deleted,
> so we need to adjust it" logic, but it doesn't seem to check if that
> adjusment runs of the end of the file and back it off instead.
> 
> Thanks!

-- 
It was recently discovered that research causes cancer in rats.

 /// Bram Moolenaar -- b...@moolenaar.net -- 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_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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/202007191518.06JFI61v237518%40masaka.moolenaar.net.

Reply via email to