Description
When exiting Claude Code with Ctrl+C, the ccline status line's box-drawing characters (─) are left behind in the terminal output, creating a visual artifact on the prompt line.
Steps to reproduce
- Configure ccline as Claude Code's status line in
~/.claude/settings.json:
"statusLine": {
"type": "command",
"command": "/path/to/ccline",
"padding": 0
}
- Start a Claude Code session
- Press Ctrl+C to cancel/exit
Expected behavior
Terminal returns to a clean prompt with no leftover characters.
Actual behavior
The prompt line shows ^C followed by a long line of ─ characters extending to the terminal edge:
$ ^C────────────────────────────────────────
$
Environment
- ccline v1.1.2
- macOS (Darwin, arm64)
- Bash shell
- iTerm2 terminal
Analysis
It appears that when Claude Code's process receives SIGINT, ccline doesn't get a chance to clear its rendered status line from the terminal. The ─ fill characters that normally form the status bar background get dumped into the visible terminal output.
A possible fix would be to install a SIGINT/SIGTERM handler in ccline that writes the appropriate terminal escape sequences (e.g., \033[2K\r to clear the line) before exiting.
Description
When exiting Claude Code with Ctrl+C, the ccline status line's box-drawing characters (
─) are left behind in the terminal output, creating a visual artifact on the prompt line.Steps to reproduce
~/.claude/settings.json:Expected behavior
Terminal returns to a clean prompt with no leftover characters.
Actual behavior
The prompt line shows
^Cfollowed by a long line of─characters extending to the terminal edge:Environment
Analysis
It appears that when Claude Code's process receives SIGINT, ccline doesn't get a chance to clear its rendered status line from the terminal. The
─fill characters that normally form the status bar background get dumped into the visible terminal output.A possible fix would be to install a SIGINT/SIGTERM handler in ccline that writes the appropriate terminal escape sequences (e.g.,
\033[2K\rto clear the line) before exiting.