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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user