Hari Krishna Dara wrote:

> If you execute a function that changes the cursor position from the
> search prompt, vim completely ignores it, but the same works fine from
> the command prompt. Say, you have something like this:
> 
> function! TT()
>   call cursor(1,1)
>   return ""
> endfunction
> 
> and you execute it as:
> 
> :<C-R>=TT()<CR>
> 
> the cursor position gets changed to the start of the file, but the same
> doesn't work if you do the below:
> 
> /<C-R>=TT()<CR>
> 
> Is this a bug or intended behavior? I can't find a way to get this to
> work without coming out of the search prompt, go into the command
> prompt to execute the function, and return back to the search prompt.
> Any help is apprecaited.

Isn't it obvious?  If you search for something the starting position is
essential.  You can't change that while manipulating the search pattern,
otherwise the search command would break.

-- 
Press any key to continue, press any other key to quit.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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://www.ICCF.nl         ///

Reply via email to