1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
#include <ncurses.h>
int main(){
initscr();
start_color();
use_default_colors();
curs_set(0);
noecho();
int maxX=0, maxY=0;
getmaxyx(stdscr, maxY, maxX);
init_pair(5, 15, 10);
attron(COLOR_PAIR(5)|A_BLINK);
mvaddch(5, maxX-1, inch()); //works as expected
mvaddch(6, maxX-1, inch());
mvaddch(6, maxX-2, inch()); //highlights whole line for some reason? whyyy? :(
mvaddch(7, maxX-1, inch());
mvaddch(7, maxX-2, 'c'); //works as expected
attroff(COLOR_PAIR(5)|A_BLINK);
refresh();
getch();
endwin();
return 0;
}
| |