Sunday, July 19, 2020

Re: gv bug?

On 2020-07-19 17:18, Bram Moolenaar wrote:
> 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.

I just went to reproduce it and there seems to be something to the
order of how the lines are selected. I slightly tweaked the order of
the commands to make it clear what range I was selecting, assuming
that a-range-was-a-range. Sorry about that confusion.

If I do the selection from top to bottom, it does indeed work as you
encountered:

$ vim -u NONE
:r !jot 15
3GVG:g/5/d
gv

But if I select them from bottom-to-top

$ vim -u NONE
:r !jot 15
V3G:g/5/d
gv

I get the (mis)behavior I was seeing...the "gv" doesn't reselect the
available range.

Again, sorry I messed up reproducing that situation.

-tim



--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20200719135401.17ecbbaf%40bigbox.attlocal.net.

No comments: