Monday, March 25, 2019

Re: vim buffer viewport changed

Replying to self one further time.

For anyone interested I went with a timer-based approach for now

let s:timer = timer_start(100, function('s:updateViewport'), {'repeat': -1})
au CursorMoved,CursorMovedI * call s:updateViewport(0)

with updateViewport defined as follows:

https://github.com/myitcv/govim/blob/87595cdf02ece5531d739e080b696d4847c387fc/plugin/govim.vim#L51-L73

This way, only deltas in the viewport are announced to my plugin.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment