> This doesn't exist yet. To consider such an addition:
> - - Is there a need? Now, we've already got at least two use cases (from
>   you and me).
> - - Is it easy to implement with few changes? You say it is.
> - - Does it help improving performance? If the core C code essentially
>   does the same as a Vimscript would do, all we'd save is a little
>   interpretation overhead. But if there's a better place (e.g. the
>   'cursorline' drawing code also has to consider the current line
>   number), it could be more efficient.
> - - Does it improve the Vimscript API? A dedicated CursorLineMoved event
>   type provides precise semantics, and would avoid boilerplate code (if
>   just a single conditional here).
> - - Is this easy to emulate? Only future Vim versions will have the new
>   event. Plugin writers still have to provide a fallback implementation
>   for older versions. Here, I think this is not a problem, as this is
>   just about efficiency gains.

The only thing I would suggest we consider at the same time is an
event that is triggered pre/post viewport changes. And by viewport, I
mean the information returned by getwininfo() (minus the variable
key), along with the current window number. Current line number
could/should be part of this.

My proposed use case here is an AST-based syntax highlighting.

I will note however that this would likely require some changes to
matchaddpos/deletematch to make them more batch friendly.

In https://github.com/myitcv/govim/pull/24 I have simulated such a
viewport changed event using timers (ideally I would have the new
highlights be added in response to the pre viewport changed event).
But the lag because of the multiple calls required to
matchaddpos/deletepos over a channel start to become apparent.

Thanks

-- 
-- 
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 because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CACoUkn6c0EZmSZBapguJNFyJ909dQJB1xU1akVad5tdq-MsQ%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui