Colorizer icon indicating copy to clipboard operation
Colorizer copied to clipboard

Color changes are reset at the end of each line (and they shouldn't)

Open ruipires opened this issue 2 years ago • 2 comments

ANSI code are free to change the color and that color will remain changed until it is reset or changed again. Currently (at least in my setup), the color changes are reset with each line.

I am running neovim, loading a file with ansi escape codes and applying them by running :ColorHighlight

ruipires avatar Oct 27 '23 09:10 ruipires

can you please show an example? It may not work perfectly for the current solution, since we need to parse the ansi color codes and highlight the matching parts in the file, so wondering you this can work.

chrisbra avatar Dec 19 '23 20:12 chrisbra

This is what I see. The behavior seems to be the same with or without the trailing ^M.

image

The expectation (and the behavior of these on a terminal) is to have the second and third line still formatted according to the color set on the first line, i.e. until the color reset code is found, at the end of the third line.

ruipires avatar Jan 08 '24 15:01 ruipires