Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gui: support up to 32767 ncurses color pairs (issue #1343) #1345

Merged
merged 8 commits into from Jun 28, 2019

Conversation

Projects
None yet
3 participants
@sim642
Copy link
Contributor

commented May 2, 2019

This PR fixes issue #1343:

  1. All uses of the problematic COLOR_PAIR macro replaced with functions that allow up to 32767 color pairs (short datatype size limit in both the ncurses functions and WeeChat's color pair table).
  2. Transposed the color table in /color buffer (and command line option -c) to sensibly allow showing more than 255 pairs.

For testing I used my colorspam.py script.

Needs to be verified that the setcchar function with its wchar_t* argument is usable in all curses setups. Could be that this needs to be put behind a preprocessor flag to work on curses libraries without wide char support or something like that.

sim642 added some commits May 4, 2019

gui: fix wbkgrndset for non-wide ncurses by fallback to wbkgdset (issue
#1343)

cchar_t, setcchar and wbkgrndset are actually widec ncurses features,
not ext-colors features, but NCURSES_WIDECHAR doesn't accurately reflect
their existence so NCURSES_EXT_COLORS is used instead.

@sim642 sim642 marked this pull request as ready for review May 13, 2019

@codecov-io

This comment has been minimized.

Copy link

commented May 13, 2019

Codecov Report

Merging #1345 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1345      +/-   ##
==========================================
- Coverage   25.94%   25.93%   -0.01%     
==========================================
  Files         198      198              
  Lines       80859    80957      +98     
==========================================
+ Hits        20980    20998      +18     
- Misses      59879    59959      +80
Impacted Files Coverage Δ
src/plugins/irc/irc-nick.c 0.48% <0%> (-0.02%) ⬇️
src/plugins/irc/irc-server.c 0.43% <0%> (-0.01%) ⬇️
src/plugins/irc/irc-protocol.c 1.32% <0%> (-0.01%) ⬇️
src/plugins/irc/irc-upgrade.c 0% <0%> (ø) ⬆️
src/plugins/irc/irc-channel.c 0% <0%> (ø) ⬆️
src/plugins/irc/irc-bar-item.c 5.3% <0%> (+0.52%) ⬆️
src/plugins/irc/irc-mode.c 5.17% <0%> (+5.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 141b428...5988d17. Read the comment docs.

@flashcode flashcode added this to the 2.6 milestone Jun 7, 2019

@flashcode flashcode self-assigned this Jun 21, 2019

@flashcode flashcode merged commit 5988d17 into weechat:master Jun 28, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

flashcode added a commit that referenced this pull request Jun 28, 2019

flashcode added a commit that referenced this pull request Jun 28, 2019

@flashcode flashcode removed the in progress label Jun 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.