it's been like that since the beginning, and i too assume it was for space
reasons. that's obsolete, though, because although the original
implementation kept the styles array the same length as the line's text, i
fixed that so lines using the default style don't even have a styles
array. so 99% of lines pay nothing.
you can even see that at _render_ time, the short[] styles are converted
into runs of StyledText, each of which has a Style, and that class _does_
use two java.awt.Colors. if you were keeping the Styles around, you'd
probably want to avoid having a unique Style object for every use of the
same style.
--
Elliott Hughes, http://www.jessies.org/~enh/
> how would changing the defaults apply to an already existing window.
If you're storing an explicit Color, changing the color to which color index n applies to wouldn't have any effect. The defaults might change, depending on whether you store an explicit Color or a special value, like null. Not applying changed defaults to existing text in an existing window would be a change in behavior but perhaps not a worrying one. Storing a color index and translating it to a color on the fly would be the alternative. Like you've already done, not all values in the "color index" need be looked up in an array - the first few could be special, leaving the remainder as translated rgb triples.
> Where's the real user's default fg/bg stored, anyway?
This line, from your patch?
- result = Terminator.getPreferences().getColor(isForeground ? TerminatorPreferences.FOREGROUND_COLOR : TerminatorPreferences.BACKGROUND_COLOR);
-----Original Message-----
From: terminat...@googlegroups.com
[mailto:terminat...@googlegroups.com] On Behalf Of Ben Longbons
Sent: Tuesday, August 11, 2009 13:41
To: terminator-users
Subject: [terminator-users] Re: Feature request: additional color support via
common SGR escape sequences
Note: next time check the logs first. There was a really stupid
> I'll try to answer that question myself from the patch...
Please, don't fucking bother.