Skip to content

Commit 9b1f7fc

Browse files
committed
Implement COLOR_PAIR using NCURSES_BITS
1 parent 34a02e1 commit 9b1f7fc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/deimos/ncurses/curses.d

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,8 @@ int clrtoeol()()
429429
int color_content(short color, short* r, short* g, short* b);
430430
int color_set(N:short, V:void)(N color_pair_number, V* opts)
431431
{ return wcolor_set(stdscr, color_pair_number, opts); }
432-
//TODO look at this, might be able to be rewritten using NCURSES_BITS
433432
chtype COLOR_PAIR(N:int)(N n)
434-
{ return cast(chtype)(n<<8); }
433+
{ return NCURSES_BITS(n, 0); }
435434
int copywin(WINDOW* srcwin, WINDOW* dstwin, int sminrow,
436435
int smincol, int dminrow, int dmincol, int dmaxrow,
437436
int dmaxcol, int overlay);

0 commit comments

Comments
 (0)