norcalli / nvim-colorizer.lua

The fastest Neovim colorizer.
Other
2.23k stars 117 forks source link

Undo repaint event #71

Open nagy135 opened 2 years ago

nagy135 commented 2 years ago

Hello I noticed issue with repainting after "undo".

Use case: on a line with color do "indent right" (>>) and press undo ...line is the same as before but highlight is shifted away from its correct location (over hex code in this case).

screen

illia-danko commented 2 years ago

Hello I noticed issue with repainting of color when undo is used.

Use case: on a line with color do "indent right" (>>) and press undo ...line is in position as before but highlight doesnt fit.

screen

Reproducible 100%. Not necessary that hex color value is inside quotes.

nagy135 commented 2 years ago

I noticed that what actually happens in this "indent case", is that it moves correctly with the text when you indent, but when you "undo" back, it actually moves twice the distance, overshooting the previous location. It probably gets moved and then moves again with the text .....not sure what is happening but this might help with debugging (tldr: indent moves it 4 right, but undo 8 left instead of 4)