Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Small, but annoying VIM bug: Interaction between * and q/

2 views
Skip to first unread message

Kenny McCormack

unread,
Dec 10, 2009, 9:52:24 AM12/10/09
to
Open up a new instance of (G)VIM, move the cursor to some word and press *.
It searches for the next occurrence of that word, as usual.

Then do: q/

The word you just searched for (which is the current contents of the
search buffer - and will be highlighted onscreen [if you have hls set])
is *not* in the q/ display. It should be. It is also not in the
command line search history buffer.

Notes:
1) This is inconsistent - and hard to find. I've noticed it
off-and-on over the years, but couldn't nail it down. It seems
to be related to being the first search - new instance of the
program and/or new file.
2) Tested with Windows GVIM, version 7.0, 7 May 2006.

SM

unread,
Dec 10, 2009, 10:15:25 AM12/10/09
to
2009-12-10, Kenny McCormack skribis:

> Open up a new instance of (G)VIM, move the cursor to some word and press *.
> It searches for the next occurrence of that word, as usual.
>
> Then do: q/
>
> The word you just searched for (which is the current contents of the
> search buffer - and will be highlighted onscreen [if you have hls set])
> is *not* in the q/ display. It should be. It is also not in the
> command line search history buffer.
>

I can't reproduce this. Works as expected on my machine.

VIM 7.2.284 on Debian Testing/Unstable.

--
kasmra
:wq

Tim Roberts

unread,
Dec 12, 2009, 12:34:59 AM12/12/09
to

Works fine for me with Windows GVIM 7.0, 7 May 2006. Maybe something in
your configuration?
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Kenny McCormack

unread,
Dec 12, 2009, 5:58:32 AM12/12/09
to
In article <cqa6i5dvmntcrrt9h...@4ax.com>,
Tim Roberts <ti...@probo.com> wrote:
...

>Works fine for me with Windows GVIM 7.0, 7 May 2006. Maybe something in
>your configuration?

It's tricky. You may to test more. It took me a long time to find a
way to replicate it - and for all I know, that method may not work
anymore.

Stephane CHAZELAS

unread,
Dec 12, 2009, 6:13:21 AM12/12/09
to
2009-12-12, 10:58(+00), Kenny McCormack:

I can reproduce it with

vim -u NONE --noplugin
or with
vim -i new-viminfo

but not otherwise. Could be that it just happens when you do a
*/# while the search history is empty. Looks like a bug to me.

If you don't want to use a .viminfo, it seems you can work
around it by adding a

let @/ = ''

in your ~/.vimrc

--
Stᅵphane

Kenny McCormack

unread,
Dec 12, 2009, 8:03:55 AM12/12/09
to
In article <slrnhi6umh.5bu.s...@spam.is.invalid>,
>St�phane

I think you've got it. I do not like the .viminfo concept, so I don't
use one (I use whatever option it is that turns it off).

So, yes, a bug. Thanks for confirming.

Lech Lorens

unread,
Dec 26, 2009, 4:23:00 PM12/26/09
to
On 2009-12-12, Kenny McCormack <gaz...@shell.xmission.com> wrote:
> In article <slrnhi6umh.5bu.s...@spam.is.invalid>,

>>
>>I can reproduce it with
>>
>>vim -u NONE --noplugin
>>or with
>>vim -i new-viminfo
>>
>>but not otherwise. Could be that it just happens when you do a
>>*/# while the search history is empty. Looks like a bug to me.
>>
>>If you don't want to use a .viminfo, it seems you can work
>>around it by adding a
>>
>>let @/ = ''
>>
>>in your ~/.vimrc
>>
>>--
>>Stéphane

>
> I think you've got it. I do not like the .viminfo concept, so I don't
> use one (I use whatever option it is that turns it off).
>
> So, yes, a bug. Thanks for confirming.


The bug has been fixed in Vim 7.2.321.
The relevant patch as posted by Bram Moolenaar can be found here:
http://groups.google.com/group/vim_dev/browse_frm/thread/7661e3c425c70a04

Thanks for reporting the problem.

--
Best regards,
Lech Lorens - lp.pw@snerol_hcel

Kenny McCormack

unread,
Dec 26, 2009, 4:44:30 PM12/26/09
to
In article <slrnhjcvll.2h...@neo.zion>,
Lech Lorens <lech_...@spam.is.not.wel.com> wrote:
...

>The bug has been fixed in Vim 7.2.321.
>The relevant patch as posted by Bram Moolenaar can be found here:
>http://groups.google.com/group/vim_dev/browse_frm/thread/7661e3c425c70a04
>
>Thanks for reporting the problem.

Thanks!

0 new messages