[patch] Initialise history before adding elements

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] Initialise history before adding elements

Lech Lorens
The attached patch fixes the behaviour of Vim where histadd() and
searching with * fail to add elements to history if the history is
empty.

How to reproduce:

Problem with histadd():

$ vim -i NONE -c 'call histadd("search", "search")' \
              -c 'call histadd("search", "for")'    \
              -c 'call histadd("search", "some")'   \
              -c 'call histadd("search", "words")'  \
              -c 'call feedkeys("q/")'

Problem with searching with *:

vim -i NONE -c 'normal ido'        \
            -c 'normal osome'      \
            -c 'normal osearching' \
            -c 'normal oplease'    \
            -c 'normal gg'         \
            -c 'normal *'          \
            -c 'call feedkeys("q/")'

Note that the window containing the history is empty, although it should
contain 4 elements in the first case and 1 element in the second case.

--
Cheers,
Lech

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php

star-find.patch (723 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] Initialise history before adding elements

Steven S-2
does anyone know why the unsubscribe does not work on this list? I have done it 4 times and got a confirmation every time. Still getting emails.

On Wed, Dec 16, 2009 at 5:38 PM, Lech Lorens <[hidden email]> wrote:
The attached patch fixes the behaviour of Vim where histadd() and
searching with * fail to add elements to history if the history is
empty.

How to reproduce:

Problem with histadd():

$ vim -i NONE -c 'call histadd("search", "search")' \
             -c 'call histadd("search", "for")'    \
             -c 'call histadd("search", "some")'   \
             -c 'call histadd("search", "words")'  \
             -c 'call feedkeys("q/")'

Problem with searching with *:

vim -i NONE -c 'normal ido'        \
           -c 'normal osome'      \
           -c 'normal osearching' \
           -c 'normal oplease'    \
           -c 'normal gg'         \
           -c 'normal *'          \
           -c 'call feedkeys("q/")'

Note that the window containing the history is empty, although it should
contain 4 elements in the first case and 1 element in the second case.

--
Cheers,
Lech

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php



--
"A conservative is a liberal who has been mugged.  A liberal is a conservative who has been hugged."

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

RE: [patch] Initialise history before adding elements

JohnBeckett
Steven Sajous wrote:
> does anyone know why the unsubscribe does not work on this
> list? I have done it 4 times and got a confirmation every
> time. Still getting emails.

Please say exactly what you did. You emailed what address
approximately how many hours ago?

John

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: [patch] Initialise history before adding elements

Steven S-2
Last Attempt:

from vim_dev <[hidden email]>
to
date Wed, Dec 16, 2009 at 3:50 PM
subject Unsubscribe request for vim_dev [{EJ2QpdkEk8REPI7uh0E0}]
mailing list vim_dev.googlegroups.com Filter messages from this mailing list
mailed-by googlegroups.com
hide details 3:50 PM (19 hours ago)
Hello 

We have received your request to unsubscribe from vim_dev. In order for us to complete the request, please reply to this email or visit the following confirmation URL:

http://groups.google.com/group/vim_dev/subscribe?hl=en

If you have questions related to this or any other Google group, visit the Help Center at http://groups.google.com/support/?hl=en.

Thanks,

google groups

On Wed, Dec 16, 2009 at 11:09 PM, John Beckett <[hidden email]> wrote:
Steven Sajous wrote:
> does anyone know why the unsubscribe does not work on this
> list? I have done it 4 times and got a confirmation every
> time. Still getting emails.

Please say exactly what you did. You emailed what address
approximately how many hours ago?

John

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php



--
"A conservative is a liberal who has been mugged.  A liberal is a conservative who has been hugged."

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: [patch] Initialise history before adding elements

Bram Moolenaar
In reply to this post by Lech Lorens

Lech Lorens wrote:

> The attached patch fixes the behaviour of Vim where histadd() and
> searching with * fail to add elements to history if the history is
> empty.
>
> How to reproduce:
>
> Problem with histadd():
>
> $ vim -i NONE -c 'call histadd("search", "search")' \
>               -c 'call histadd("search", "for")'    \
>      -c 'call histadd("search", "some")'   \
>      -c 'call histadd("search", "words")'  \
>      -c 'call feedkeys("q/")'
>
> Problem with searching with *:
>
> vim -i NONE -c 'normal ido'        \
>             -c 'normal osome'      \
>    -c 'normal osearching' \
>    -c 'normal oplease'    \
>    -c 'normal gg'         \
>    -c 'normal *'          \
>    -c 'call feedkeys("q/")'
>
> Note that the window containing the history is empty, although it should
> contain 4 elements in the first case and 1 element in the second case.

Thanks, I'll put it in the todo list.

--
Seen it all, done it all, can't remember most of it.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php