Skip to content

fix: prevent exit input events from being swallowed - #90

Open
Flyboy1010 wants to merge 1 commit into
oiwn:mainfrom
Flyboy1010:fix/input-events
Open

fix: prevent exit input events from being swallowed#90
Flyboy1010 wants to merge 1 commit into
oiwn:mainfrom
Flyboy1010:fix/input-events

Conversation

@Flyboy1010

Copy link
Copy Markdown

The input handling in run_loop could consume keyboard events without processing them.

process_input() would read one event, and then run_loop() would drain the remaining pending events. Keyboard events encountered by this second loop were discarded, which could cause q, Esc, or Ctrl+C to be ignored. This made quitting tarts unreliable and sometimes required multiple key presses.

This change moves all event handling into process_input(), including:

q, Esc, and Ctrl+C quit handling
Terminal resize handling
Processing all pending events in a single place

This prevents keyboard events from being silently swallowed and makes quitting reliable.

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.

1 participant