Skip to content

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

Open

Description

@ruipires

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

Activity

  1. chrisbra commented on Dec 19, 2023

    @chrisbra
    Owner

    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.

  2. ruipires commented on Jan 8, 2024

    @ruipires
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions