Sorry, I should have said about more details.

This problem occurs in the following circumstances:
- 'incsearch' is on
- "get_foo" is under the cursor
- the last character on the command-line is "g" like %s/get_foo//g
- cursor position is <cursor>: %s/get_foo/<cursor>/g
- type <C-r><C-w>

The reason why this problem occurred is,
that Vim looks for the part of inserted cword
from the end of command-line.
So I fixed that looks for from the current position of the command-line.


On Tuesday, June 7, 2011, Andy Wokula <[email protected]> wrote:
> Am 06.06.2011 20:49, schrieb Ben Fritz:
>
>
>
> On Jun 6, 10:09 am, tyru<[email protected]>  wrote:
>
> Hi list.
>
> Attached patch fixed the problem.
>
>
>
> What problem?<C-R><C-W>  in the command line always works fine for me.
>
>
> I see, it's the normal ^R^W that picks "get_foo" from the text.
>
> Problem arises if the interesting word (or a prefix of it) is already
> found at the end of the cmdline.  Try then ^R^W in the middle of the
> cmdline.
>
> In this case, the prefix is "g" and ^R^W gets you "et_foo".
>
> Help for ^R^W says the feature was meant to complete a word for
> 'incsearch' (when the cursor is expected to be at the end of the
> cmdline).
>
> --
> Andy
>
> --
> 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
>

-- 
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