You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, on mingw Ruby26-x64, on Windows 7, using curses-1.4.4 and the statically-linked default PDCurses, attron(color_pair(n)) doesn't have any effect, and I only get the default gray-on-black, from this example:
require'curses'includeCursesinit_screenstart_colorinit_pair(6,COLOR_BLUE,COLOR_RED)attron(color_pair(6))dosetpos(5,5)addstr('this should be in blue on red')endgetchclose_screen
It looks like PDCurses is compiled in 64-bit chtype mode by default, and the color bits are shifting off the end of a regular 32-bit long and getting truncated in window_attron(), window_attroff(), window_attrset(), and curses_color_pair() by the INT2FIX()/NUM2INT() macros.
Replacing these macros with NUM2CHTYPE() and CHTYPE2NUM() in the color/attr functions seems to resolve the problem and the example above works as expected.
The text was updated successfully, but these errors were encountered:
Hi, on mingw Ruby26-x64, on Windows 7, using curses-1.4.4 and the statically-linked default PDCurses, attron(color_pair(n)) doesn't have any effect, and I only get the default gray-on-black, from this example:
It looks like PDCurses is compiled in 64-bit chtype mode by default, and the color bits are shifting off the end of a regular 32-bit long and getting truncated in window_attron(), window_attroff(), window_attrset(), and curses_color_pair() by the INT2FIX()/NUM2INT() macros.
Replacing these macros with NUM2CHTYPE() and CHTYPE2NUM() in the color/attr functions seems to resolve the problem and the example above works as expected.
The text was updated successfully, but these errors were encountered: