Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Colour support in editline



Hi!

Yes, there is interest, but it should be done correctly. Currently this
is difficult because the marker hack to indicate the beginning and the
end of an escape sequence so that it is not counted as a cursor position
does not work properly. Instead it should be replaced with something that
works (perhaps an adjacent data structure that holds pointers to ANSI
escape sequences or NULL for each character position in the line. That is
memory expensive, but easy to implement.

I would like to try the following approach.

Introduce ‘DisplayChar’ type to represent a character cell in el_display/el_vdisplay.
DisplayChar consists of a Char + (if colour support is enabled via compile options)
some select SGR attributes. Basically 32 bits are enough to represent 2 8 bit
colours and there are 16 bits left for text attributes like bold, etc.

What do you think?

Regards,
Nick


Home | Main Index | Thread Index | Old Index