Open
Conversation
`wchar_t` may not be UTF-16LE on other platforms.
Use `addnwstr` and `waddnwstr` if they are available
libncurses5-dev isn't installed by default on Linux Mint
Include reference to libncurses5-dev dependency
Favor ncursesw over curses
Add documentation link
Co-authored-by: Claude <noreply@anthropic.com>
Fix assignment
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
…heckout-6 Bump actions/checkout from 5 to 6
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.2 to 2.13.3. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@95d9a5d...df199fb) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-version: 2.13.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…rity/harden-runner-2.13.3 Bump step-security/harden-runner from 2.13.2 to 2.13.3
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.3 to 2.14.0. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@df199fb...20cf305) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-version: 2.14.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…rity/harden-runner-2.14.0 Bump step-security/harden-runner from 2.13.3 to 2.14.0
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.14.0 to 2.14.1. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@20cf305...e3f713f) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-version: 2.14.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…rity/harden-runner-2.14.1 Bump step-security/harden-runner from 2.14.0 to 2.14.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.14.1 to 2.14.2. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@e3f713f...5ef0c07) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-version: 2.14.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…rity/harden-runner-2.14.2 Bump step-security/harden-runner from 2.14.1 to 2.14.2
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.14.2 to 2.15.0. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@5ef0c07...a90bcbc) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-version: 2.15.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…rity/harden-runner-2.15.0 Bump step-security/harden-runner from 2.14.2 to 2.15.0
Use init_extended_pair/init_extended_color/extended_color_content/ extended_pair_content when available (ncurses 6+), removing the 256 color pair limitation. Window#color_set is upgraded to use wattr_set internally when available, allowing pair numbers > 255. New methods: - Curses.support_extended_colors? — runtime check for extended support - Curses.reset_color_pairs — reset all pairs to undefined (ncurses 6.1+) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When Curses.support_extended_colors? returns true, display up to 512 color pairs (capped at color_pairs) using stdscr.color_set instead of attrset(color_pair()), since COLOR_PAIR() cannot encode pair numbers > 255. Pairs 256-511 use a dark grey background to distinguish them from the first 256. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- curses_color_content, curses_pair_content: check return value of extended_color_content/color_content/extended_pair_content/pair_content and return nil on ERR instead of returning uninitialized values - curses_reset_color_pairs: add curses_stdscr() call for consistency with other color APIs - window_color_set: use wattr_get to preserve existing window attributes when calling wattr_set; use NCURSES_PAIRS_T for the pair argument to match the ncurses header type in both standard and extended modes; fall back to wattr_set without attr preservation if wattr_get is unavailable, and to wcolor_set if wattr_set is also unavailable - extconf.rb: add have_func check for wattr_get - sample/colors.rb: skip pair 0 (cannot be redefined); use i%colors instead of i%256 to handle terminals with fewer than 256 colors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
NCURSES_PAIRS_T is ncurses-specific and not defined in PDCurses. Fall back to short when it is not available. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Support ncurses extended colors API
These wrap wattr_set() and wattr_get() respectively, exposing the full extended color pair number (> 255) that attrset/color_set cannot represent. attr_set(attrs, pair) sets both attributes and color pair; attr_get returns [attrs, pair] as a 2-element Array. Both are guarded by HAVE_WATTR_SET / HAVE_WATTR_GET and fall back to rb_f_notimplement when unavailable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- attr_set: NUM2ULONG -> NUM2UINT to match attr_t (unsigned int) - attr_get: ULONG2NUM -> UINT2NUM for attr_t; INT2FIX -> INT2NUM for pair number to safely handle extended pair values on all platforms Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Window#attr_set and Window#attr_get
Do not use wattr_set() if wattr_get() is unavailable
To check easily whether these functions are available.
Do not use rb_f_notimplement for attr_set/attr_get
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.