Skip to content

Fix a "chunk size must be non-zero" panic - #919

Open
Leonard Hecker (lhecker) wants to merge 2 commits into
mainfrom
dev/lhecker/698-chunk-size-panic
Open

Fix a "chunk size must be non-zero" panic#919
Leonard Hecker (lhecker) wants to merge 2 commits into
mainfrom
dev/lhecker/698-chunk-size-panic

Conversation

@lhecker

@lhecker Leonard Hecker (lhecker) commented Aug 17, 2026

Copy link
Copy Markdown
Member

This fixes the issue in two ways:

  • Be explicit about acquiring the terminal size
  • Ignore invalid resizes during runtime

Regarding the former, I'm not entirely sure if
I should retry the ioctl(TIOCGWINSZ) or not.

Closes #698

@stdmnpkg stdmnpkg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partially works on my x86-64 Linux machine, for i in {1..100}; do ./target/debug/edit; done and hold Ctrl+Q no longer crash. Background color is inconsistent between runs (mostly blue, sometime black, I'm using Windows Terminal with Campbell Powershell pallet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]Panic: "chunk size must be non-zero" when using 'edit' over multiple SSH sessions

2 participants