Monday, March 18, 2019

Re: vim buffer viewport changed

> But I'm struggling to find the right combination of events/whatever to fire when the visible part (viewport?) of a buffer changes. For example, as a result of a page down, normal mode G jumping to the end of the buffer, gg to go to the top, etc. I want to use such an event to call matchaddpos to highlight the now-visible part of the buffer (which keeps the number of calls to matchaddpos down).

Apologies - it seems I've been making a basic error in my use of winsaveview(); using that in combination with CusorMoved, CusorMovedI, winheight() and winwidth() gets me a lot of the way there.

The one remaining case I can't currently handle is when the size of a split changes: I need to somehow trigger the change in viewport for all buffers affected by, for example, moving the horizontal/vertical split point.

Again, any pointers much appreciated.

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