Project
vgrep
Description
The interactive TUI in src/ui/search_tui.rs does not properly handle panics. If any code between enable_raw_mode() and disable_raw_mode() panics, the terminal will be left in raw mode, making it unusable until the user runs reset or opens a new terminal.
Error Message
After panic, terminal shows:
- No echo of typed characters
- No line editing
- Ctrl+C doesn't work properly
- Prompts not displayed correctly
Debug Logs
System Information
- Bounty Version: 0.1.0
- OS: Ubuntu 24.04 LTS
- Rust: 1.75+
Screenshots
No response
Steps to Reproduce
- Start interactive TUI:
vgrep tui
- Trigger a panic (e.g., by corrupting database or causing memory issue)
- Observe terminal is left in broken state
- Must run
reset or stty sane to fix
Expected Behavior
Terminal should be restored to normal state even if the TUI code panics:
- Raw mode disabled
- Alternate screen exited
- Mouse capture disabled
- Cursor shown
Actual Behavior
If panic occurs:
- Terminal left in raw mode
- Alternate screen may still be active
- User input is garbled
- User must manually run
reset command
Additional Context
No response
Project
vgrep
Description
The interactive TUI in
src/ui/search_tui.rsdoes not properly handle panics. If any code betweenenable_raw_mode()anddisable_raw_mode()panics, the terminal will be left in raw mode, making it unusable until the user runsresetor opens a new terminal.Error Message
Debug Logs
System Information
Screenshots
No response
Steps to Reproduce
vgrep tuiresetorstty saneto fixExpected Behavior
Terminal should be restored to normal state even if the TUI code panics:
Actual Behavior
If panic occurs:
resetcommandAdditional Context
No response