Closed kaspergrubbe closed 6 years ago
I would like to add a $50 bug bounty that fixes this issue, or help me get https://github.com/kaspergrubbe/curses_colortest to render properly.
@shugo or @hsbt if you know anyone I could reach out to that might be interested in looking into this issue please point them in this direction, please.
It seems to mess up the characters when I use a color_pair
higher than 16383
:
But under works fine:
Everything is working when using ncurses 6.1 by compiling curses with ncurses from Homebrew:
bundle config build.curses --with-cflags="-I$(brew --prefix)/opt/ncurses/include" --with-ldflags="-L$(brew --prefix)/opt/ncurses/lib"
Can you also add the code for the .rb file? I'd love to reproduce this.
@rubyFeedback Hi, first: Thanks for your interest in curses in Ruby, it's something I haven't played with for a while, but it's a fascinating world creating TUIs, it's a dark art, and things are a bit low-level and sometimes a little wonky :)
I think all the code is available here: https://github.com/kaspergrubbe/curses_colortest is there anything else you're missing? :)
Hi,
This has been bugging me for a while, and I do not know if I am doing something wrong, or if it is a bug in either
curses
,ncurses
or in my terminal.I have created a fairly elaborate script that first loads in a colorscheme, I have stolen the material colors scheme from Android to work with (please see the
material-colors.json
file here: https://gist.github.com/kaspergrubbe/f6e64178e3962a3609e93569dc7722ce). It then reads all the hex values, and converts it to ncurses (between 0 and 1000) like this:I then read the
materials-colors.json
file, it is grouped by colorname and a weight like so:I then load in all the individual colours, calculate all possible combination of colour pairs where each color can be both front and back, and then I initialise
curses
and get it to setup the colours.I then print
lol
5 times:But the results are very strange. This is how iTerm renders it:
If you hover over it, you can see that it writes some text:
And the OSX Terminal.app renders it very differently:
However, while Terminal.app manages to reset the colors after the program exits, the same cannot be said about iTerm:
Before:
After:
I have made a whole repo here: https://github.com/kaspergrubbe/curses_colortest the only thing to test is just cloning the repo and running
ruby colortest.rb
.Can you see something I can't?