casouri / vundo

Visualize the undo tree.
413 stars 20 forks source link

color problem when use vundo-prev or vundo-next? #11

Closed liuyinz closed 2 years ago

liuyinz commented 2 years ago

Normal: I comment a paragraph, it changes code block's color, and I use undo, it uncomment back, color restore.

vundo: I comment a paragraph, it changes code block's color, and I use vundo-prev and vundo-confirm, it uncomment back, but color don't restore.

Does it relate to read-only mode ? I checkout e136164f779e9a91ef722778acc704048ba0809a, it's OK.

casouri commented 2 years ago

Probably because of inhibit-modification-hooks. Jit-lock marks changed text as unfontified and redisplay will refortify the text. I disabled inhibit-modification-hooks because I've encountered cases where aggresive-indent-mode messes up the buffer content. Not sure how we go about this, hmmm

liuyinz commented 2 years ago

That is quite annoying…

casouri commented 2 years ago

Ok, I removed inhibit-modification-hooks, neither undo nor undo-tree sets it, vundo probably shouldn't set it anyway. Even if there are baddies that try to mess up the buffer, we now mark the buffer read-only so there shouldn't be a big problem.

liuyinz commented 2 years ago

Everything is just fine~