pub fn ensure_mouse_capture()Expand description
What: Ensure mouse capture is enabled for the TUI.
Inputs:
- None.
Output:
- No return value; enables mouse capture on stdout if not in headless mode.
Details:
- Should be called after spawning external processes (like terminals) that might disable mouse capture.
- Safe to call multiple times.
- In headless/test mode (
PACSEA_TEST_HEADLESS=1), this is a no-op to prevent mouse escape sequences from appearing in test output. - On Windows, this is a no-op as mouse capture is handled differently.