Fix: Propagate user exit signal to break animation loop

**CRITICAL BUG FIX**: When using -l (loop), the outer loop in main.rs
was restarting the animation even after user pressed exit keys.

Changes:
- render() now returns Result<bool> instead of Result<()>
- Returns true when user presses exit key (q/ESC/Ctrl+C)
- Returns false when animation completes naturally
- main.rs checks return value and breaks loop on user exit

This fixes the infinite loop issue where pressing q/ESC/Ctrl+C
had no effect when using the -l flag.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-09 07:08:24 +01:00
parent 946289544d
commit 12793893c3
3 changed files with 15 additions and 11 deletions

View File

@@ -43,7 +43,7 @@ impl AnimationEngine {
self
}
pub async fn run(&self, terminal: &mut TerminalManager) -> Result<()> {
pub async fn run(&self, terminal: &mut TerminalManager) -> Result<bool> {
let renderer = renderer::Renderer::new(
&self.ascii_art,
self.duration_ms,