todo-comments.nvim icon indicating copy to clipboard operation
todo-comments.nvim copied to clipboard

Text not refreshed after Undo.

Open glyh opened this issue 4 years ago • 5 comments

asciicast

To reproduce:

TODO: TODOSOMETHING
abcabcabc

delete the first line via dd. then press u to undo. Now the TODOs are not painted correctly. Maybe this is related to the mechanism of this plugin?

glyh avatar Aug 20 '21 11:08 glyh

Installing nvim-treesitter fixed this for me.

notpeelz avatar Oct 09 '21 08:10 notpeelz

I m using nvim-treesitter and it had no effect, how could it?? There seems to be issue with repainting on some events ...i "fix" this with toggling fullscreen of my terminal or scrolling down/up where repaint event is triggered.

nagy135 avatar Nov 04 '21 07:11 nagy135

I m using nvim-treesitter and it had no effect, how could it??

todo-comments listens for treesitter highlight updates

notpeelz avatar Nov 04 '21 22:11 notpeelz

i see, so i probably doesnt have it enabled for language i looked at, mb. But it should not be needed ofc because this limits it just to treesitter supported filetypes.

nagy135 avatar Nov 05 '21 04:11 nagy135

i see, so i probably doesnt have it enabled for language i looked at, mb. But it should not be needed ofc because this limits it just to treesitter supported filetypes.

Hi, I have a similar problem. And I'm also using nim-treesitter. I notice that it will be OK when I refresh the buffer, like using :e! or switch to another buffer, or just open nvim-tree. So, It seems that todo-comments, on some conditions, requires some "force" ops on the buf to refresh highlights.

OliverChao avatar May 30 '22 11:05 OliverChao