Hello,

I've recently added OSC 104 support in http://kakoune.org so reset the color 
palette on exit,
this fixes a bug that has been bothering some users for some time, the fact 
that the palette
was garbled on exit, and their use of 256 colors in DIR_COLORS was broken.

This worked nicely with Xterm and VTE based terminals, but rxvt-unicode does 
not support that
escape sequence. I believe it should, as it supports changing the color 
palette, it seems
being able to reset a color (or the whole palette) to its initial color is a 
natural side feature.

I did take a look at how to implement that myself, and hit a design issue. 
Rxvt-unicode does not
seems to keep the default palette anywhere. The 'rs' array gets initialized 
with resources, then
non initialized colors gets filled with default values, and then, on OSC 4, the 
'rs' array gets
modified directly to change color values.

The problem is that to get back the default values, we would need to parse 
again the .Xdefaults
file, which seems very innefficient, or we should keep the default palette (as 
modified by
.Xdefaults) in an array that does not change during runtime.

Is my analysis correct, what would be the preferred approach ?

Cheers,

Maxime Coste.

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode

Reply via email to