Skip to content

fix(tui): restore cursor on Ctrl+C interrupt during spinner#2

Merged
echobt merged 1 commit intomasterfrom
fix/bounty-issue-1522
Jan 26, 2026
Merged

fix(tui): restore cursor on Ctrl+C interrupt during spinner#2
echobt merged 1 commit intomasterfrom
fix/bounty-issue-1522

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 26, 2026

Summary

This PR fixes a bug where the terminal cursor remains hidden if the user interrupts the application with Ctrl+C while a spinner is active.

Changes

  • Explicitly calls terminal.show_cursor() in the Ctrl+C handler path within EventLoop::handle_engine_event.
  • This ensures that even if the application exits abruptly via the internal Ctrl+C handler, the cursor is restored.

Testing

  • Verified that interrupting the application during a spinner animation properly restores the cursor.
  • Verified that other Ctrl+C behaviors (clearing input, exiting interactive mode) are unaffected.

Related

Fixes PlatformNetwork/bounty-challenge#1522

    Fixes bounty issue #1522

    The cursor remained hidden if the user interrupted the application with
    Ctrl+C while a spinner was active. This was because the terminal
    state wasn't fully restored in the Ctrl+C handler path.

    This change explicitly calls terminal.show_cursor() when handling the
    Ctrl+C interrupt signal in the event loop, ensuring the terminal
    is left in a usable state.
@echobt echobt force-pushed the fix/bounty-issue-1522 branch from d204d52 to 50ade49 Compare January 26, 2026 16:50
@echobt echobt merged commit da71f46 into master Jan 26, 2026
4 of 12 checks passed
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] cortex run Leaves Cursor Hidden After Interrupted Spinner

2 participants