Skip to content

color detection is wrong in NCstyle #49

@hramrach

Description

@hramrach

NCurses.cc

    yuiMilestone() << "have color = " << ::has_colors()  << std::endl;

    if ( want_colors() && ::has_colors() )
    {
        if ( ::start_color() != OK )
            throw NCursesError( "start_color() failed" );

        NCattribute::init_colors();
    }

NCattribute.h

inline static int colors()      { return _colors ? _colors : ::COLORS; }

NCattribute.cc

    yuiMilestone() << "Init " << term_t << " using " << ( NCattribute::colors() ? "color" : "bw" )

                   << " => " << MaxStyleSet << " styles in " << styleName << std::endl;

NCattribute::colors() is used to detect colorness but it returns non-false regradless of NCattribute::init_colors() being called or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions