Repository navigation
Redraw the map after the TERMINAL TOO SMALL screen - #13
Merged
Merged
Conversation
check_resize() only called docrt() when the size differed from last_cols/last_rows, which the too-small loop never updates. Shrinking the terminal and restoring the same 80x24 left the warning on screen over a stale map. Found by the soak harness port. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
neuhaus
pushed a commit
to neuhaus/protoHack
that referenced
this pull request
Nov 15, 2026
Redraw the map after the TERMINAL TOO SMALL screen
neuhaus
pushed a commit
to neuhaus/protoHack
that referenced
this pull request
Nov 15, 2026
…; docs - quit reads the screen (dismiss --More--, cancel prompts, then Q): blind ' ' passed turns and new --More-- pages swallowed the Q - restore check looks only at the respawned game's output - a TERMINAL TOO SMALL screen still up after restoring 80x24 fails the run (the bug fixed in Critlist#13) - dev/README.md: lanes, what a run does, soak recipe, replay - CHANGELOG entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Shrinking the terminal below 80x24 and then restoring the same 80x24 left the "TERMINAL TOO SMALL" text on screen and never redrew the map.
Cause:
check_resize()only callsdocrt()when the size differs fromlast_cols/last_rows. The too-small loop never updates those, so restoring the original size looks like no change.Fix: a
was_smallflag set on entering the loop forces the redraw. 5 lines insrc/root/hack.main.c, plus a CHANGELOG entry.Found by: the soak harness being ported from restoHack. Its runner saw the stale screen and stopped getting output, which looked like a hang.
Verified with a pexpect script: shrink to 72x12, take a turn, restore 80x24.
main🤖 Generated with Claude Code