On Thu, May 5, 2011 2:25 pm, Bram Moolenaar wrote:
>
> Christian Brabandt wrote:
>
>> Hi Bram,
>> attached patch fixes this issue from todo.txt:
>>
>> 8   Add an event like CursorHold that is triggered repeatedly, not just
>> once after typing something.
>> Need for CursorHold that retriggers.  Use a key that doesn't do
>> anything,
>> or a function that resets did_cursorhold.
>
> Thanks.  Did you verify it actually keeps triggering in various
> environments?  Esp. terminal, GUI and Windows console.

Tested it only in gui and console version on Linux.

>>  /*
>> - * Return TRUE if the CursorHold event can be triggered.
>> + * Return 1 if the CursorHold event can be triggered.
>> + * Return 2 if the CursorHoldR event can be triggered.
>>   */
>>      int
>>  trigger_cursorhold()
>
> It's simpler if you have it either return zero, KE_CURSORHOLD or
> KE_CURSORHOLDR.

I can do that.

>
> Would we need a separate CursorHoldRepeat and CursorHoldRepeatI?  So
> that we can separate Normal and Insert mode?  Would at least be more
> consistent.

Ok. I'll post an updated patch later. Should the event be called
CursorHoldRepeat(I)?

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