chromatica.nvim icon indicating copy to clipboard operation
chromatica.nvim copied to clipboard

Highlighting is not updated on viewport change

Open IngoMeyer441 opened this issue 6 years ago • 3 comments

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 avatar May 25 '18 09:05 IngoMeyer441

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

IngoMeyer441 avatar May 25 '18 09:05 IngoMeyer441

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

arakashic avatar May 25 '18 14:05 arakashic

Tried it and works great without any noticeable performance hit. :+1:

IngoMeyer441 avatar May 28 '18 08:05 IngoMeyer441