Hi Shlomi!

On Mo, 27 Feb 2012, Shlomi Fish wrote:

> Hi all.
> 
> «exe normal "?\r\n"» changes the direction of the search to backwards
> from the ":" command line, but not from within a function.
> 
> For example, with this vimscript file (called test.vim):
> 
> [QUOTE]
> function! Test_back_search()
>     exe "normal ?\r\n"
> endfunction
> [/QUOTE]
> 
> Then after I press "*" and do «:exe normal "?\r\n"» (from the ex-
> command line) then the direction of the search changes to backwards
> but if I do «:call Test_back_search()» then it search backwards once,
> but further presses on "n" yield forward searches. I don't understand
> why it should not work properly in both cases, and it seems like a
> bug.
> 
> This interferes with further development on this Vim plugin:
> 
> https://github.com/shlomif/add-to-word-search.vim
> 
> I tried it both with an old gvim 7.3 from Mercurial (
> changeset:   3132:fb6b43d55773
> tag:         tip
> user:        Bram Moolenaar <[email protected]>
> date:        Fri Sep 30 18:35:57 2011 +0200
> summary:     Added tag v7-3-329 for changeset ec901ddc84d5
> 
> ) and with vim-X11-7.3.444-1.mga2 from Mageia Linux 2. It happens with
> vim -u NONE -U NONE too.

I think, what you are observing is described at

:h function-search-undo

regards,
Christian

-- 
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui