Conversation
YO4
commented
Jan 6, 2026
- Add RubyInstaller2 logo and help command guidance to irb start screen.
- Make console reading more robust.
- Improve console window size calculation
irb with the RubyInstaller2 logo and help command guidance. also clear the screen when it seems appropriate.
When selecting while a large amount of console input is arriving at high rate, the console read thread may continue reading. For example, hold down the cursor keys to move the mouse cursor and click while doing so. To address this, only perform console input when necessary.
reserve lines for the headline. handle cases when the console is too small.
|
Hey this is great, thank you for working on this. The startmenu.rb is my ad-hoc solution for shrinking the number of icons to only one, in order to meet the Microsoft store requirements. It shall run without external dependencies. |
bin/startmenu.cmd
Outdated
| @echo off | ||
|
|
||
| set dir=%~dp0 | ||
| ruby -r "%dir:\=/%../lib/ruby_installer/runtime/console_ui" "%dir:\=/%../resources/files/startmenu.rb" |
There was a problem hiding this comment.
ruby -I "%dir:\=/%../lib" "%dir:\=/%../resources/files/startmenu.rb"
is enough to run the startmenu in the project tree.
There was a problem hiding this comment.
I was only concerned about console_ui, but your suggestion looks smarter.
ruby_installer/runtime/colors.rb is loaded from outside the repository, so a note will be added.
| if @base_console_input_mode | ||
| IO.console.write "." | ||
| setconsolemode(@base_console_input_mode | ENABLE_EXTENDED_FLAGS) | ||
| IO.console.write "+" |
There was a problem hiding this comment.
I'm embarrassed.
Would it be okay if I stash it away in the end?
Added a note regarding other files that are loaded.
It seems the mouse can't be used when using conhost (not Windows Terminal). Running `start ruby startmenu.rb` from within the terminal causes identification to fail, but worrying about that is probably pointless.
|
In fact, on my end, the screen clearing output is being ignored in ButtonMatrix#repaint. The cause has not been identified. Even so, I believe this has improved accessibility for users at this point. |
The `CSI 2 J` sequence stores screen contents in the scroll buffer in modern terminals. In this case, this is unnecessary operation.
|
I had misunderstood the behavior of the escape sequence used for screen clearing, so I've fixed it. And my stance on whether to force push for debug code miscommits is neutral at this time. |