On 4/11/06, Anatoli Sakhnik <[EMAIL PROTECTED]> wrote:
> Hello!
> Can anyone tell me what's wrong in the following function. I select
> something, press \/, enter _graph on the prompt and get another prompt
> immediately...
>
> function! VisualRangeSearch(flags)
> let pat = input("'<,'>/")
> let s = '\%V'.pat
> call search(s, a:flags)
> endf
>
> vnoremap <Leader>/ :call VisualRangeSearch('')
> vnoremap <Leader>? :call VisualRangeSearch('b')
Something strange is going on here.
I simplified the testcase to 1 liner:
vnoremap \\ :call input(line('.').col('.').'>>>')<cr>
If you visual-select multiple lines and press \\,
you'll see that input() is called multiple times, once
for each selected line. Strange.
Yakov