nvim-colorizer.lua icon indicating copy to clipboard operation
nvim-colorizer.lua copied to clipboard

Undo repaint event

Open nagy135 opened this issue 4 years ago • 2 comments

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

nagy135 avatar Dec 13 '21 12:12 nagy135

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.

ed7ed avatar Dec 17 '21 17:12 ed7ed

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)

nagy135 avatar Dec 17 '21 17:12 nagy135