Use io-console for Windows console support - #917
Merged
Conversation
nobu
force-pushed
the
windows-console-support
branch
14 times, most recently
from
August 8, 2026 04:05
a4489e0 to
88e24e5
Compare
nobu
marked this pull request as ready for review
August 8, 2026 06:02
nobu
force-pushed
the
windows-console-support
branch
from
August 8, 2026 08:41
88e24e5 to
f7acb32
Compare
tompng
reviewed
Aug 8, 2026
| def move_cursor_column(val) | ||
| _, _, _, y, = get_console_screen_buffer_info | ||
| @SetConsoleCursorPosition.call(@hConsoleHandle, y * 65536 + val) if y | ||
| @console_output.goto_column(val) |
Member
There was a problem hiding this comment.
Reline::LineEditor assumes move_cursor_column and other methods not raise SystemCallError.
What do you think of adding rescue SystemCallError and make it no-op instead of raising error.
Member
Author
There was a problem hiding this comment.
Only in reline methods?
Or do you think that io-console should not raise SystemCallError?
Member
There was a problem hiding this comment.
IMO only in Reline methods is enough.
I think it's fine, or even expected in some case, to raise SystemCallError when there's no console handle available. I'm not sure though.
tompng
reviewed
Aug 8, 2026
Remove Fiddle bindings by using `io-console` for Windows input and screen operations.
nobu
force-pushed
the
windows-console-support
branch
from
August 10, 2026 13:48
f7acb32 to
4628d75
Compare
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.
Summary
IO#console_input_eventsfor interruptible input event processingfiddledevelopment dependencyReline::KeyEventRecordMotivation
Reline currently carries its own Win32 API bindings and input record parsing. Moving those responsibilities to io-console removes duplicated platform code, gives CRuby and JRuby the same Windows console path, and lets console input waits remain responsive to Ruby interrupts.
This PR depends on ruby/io-console#140. The Gemfile temporarily points at its development branch so this PR can test the integration before the required io-console version is released.
Validation