bug-ncurses
[Top][All Lists]
Advanced

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

Random inverted and underlined characters?


From: elronnd
Subject: Random inverted and underlined characters?
Date: Mon, 16 Jan 2017 20:35:23 -0700 (MST)
User-agent: Alpine 2.20 (BSF 67 2015-01-07)

I encountered this in a more complex program, but here's a minimal example:

#include <ncurses.h>

int main() {
        unsigned short t = 1;
        initscr();
        start_color();
        for (int i=0;i<80;i++) {
                for (int j=0;j<25;j++) {
                        init_pair(t, COLOR_WHITE, COLOR_BLACK);
                        attron(COLOR_PAIR(t));
                        mvprintw(j, i, "#");
                        attroff(COLOR_PAIR(t));
                        t++;
                }
        }
        refresh();
        getch();
        endwin();
        return 0;
}

As you can see when you run it, a bunch of scattered characters are underlined or inverted. This isn't affected by whether or not I put an attroff(A_UNDERLINE) or attroff(A_REVERSE) after the attronn(COLOR_PAIR(t)). Why is this?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]