eraserhd / kak-ansi

Kakoune support for rendering ANSI-colored text.
https://github.com/eraserhd/kak-ansi
The Unlicense
39 stars 4 forks source link

Add support for rendering only the selection #1

Closed mawww closed 5 years ago

mawww commented 5 years ago

Also keep the existing value for ansi_color_ranges, as Kakoune built-in range option update code should ensure they stay valid, add a helper command to clear the option if needed.

mawww commented 5 years ago

This change, combined with the just pushed change to BufReadFifo (that makes it easy to select the appended data), makes it practical to use kak-ansi on a fifo buffer, as it avoids trying to re-render the whole buffer (which might be big), and instead only renders the appended part (which should be smaller).

EDIT: Also, it add support for no parameter in the SGR, which should be treated as SGR 0.

eraserhd commented 5 years ago

Woot! Thanks.

eraserhd commented 5 years ago

We might need track state somehow for fifos, for example if several blobs of text arrive at different times and the colors should be extended to all of them before a reset code. But that seems like a problem to fix another day.