[palette] seed initial notcurses palette from tdesc

This commit is contained in:
nick black 2021-12-09 23:38:58 -05:00 committed by nick black
parent e106029c90
commit efc542beb7

View File

@ -1189,6 +1189,10 @@ notcurses* notcurses_core_init(const notcurses_options* opts, FILE* outfp){
free(ret);
return NULL;
}
if(ret->tcache.maxpaletteread > -1){
memcpy(ret->palette.chans, ret->tcache.originalpalette.chans,
sizeof(*ret->palette.chans) * (ret->tcache.maxpaletteread + 1));
}
if((ret->flags & NCOPTION_PRESERVE_CURSOR) ||
(!(ret->flags & NCOPTION_SUPPRESS_BANNERS))){
// the u7 led the queries so that we would get a cursor position