Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

Highlighting is not updated on viewport change #51

Open
IngoMeyer441 opened this issue May 25, 2018 · 3 comments
Open

Highlighting is not updated on viewport change #51

IngoMeyer441 opened this issue May 25, 2018 · 3 comments

Comments

@IngoMeyer441
Copy link
Contributor

Hey,
chromatica does not update highlighting when only the viewport is changed (e.g. by pressing zz or <C-y>) and the cursor stays in place. Would it maybe be better to call chromatica#handlers#_highlight() on CursorHold and not on CursorMoved? (see handlers.vim)

@IngoMeyer441
Copy link
Contributor Author

color_coded calls its update routine on CursorHold, CursorHoldI, CursorMoved and CursorMovedI (https://github.com/jeaye/color_coded/blob/master/plugin/color_coded.vim#L52). However, binding to insert mode events could be quite slow...

@arakashic
Copy link
Owner

Sure. That is a good idea. I have pushed it to master. I would imagine no big hit on performance. Please try it.

@IngoMeyer441
Copy link
Contributor Author

Tried it and works great without any noticeable performance hit. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants