mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-12-16 01:48:56 +08:00
feat: Improve POSIX piped input handling
Refactored the POSIX piped input handling to avoid redirecting stdin. Instead, it now directly opens and reads from /dev/tty for keyboard input when stdin is piped, allowing applications to process piped data while still receiving interactive keyboard events. This addresses the TODO comment in ScreenInteractive::InstallPipedInputHandling().
This commit is contained in:
@@ -147,6 +147,8 @@ class ScreenInteractive : public Screen {
|
||||
|
||||
// Piped input handling state (POSIX only)
|
||||
bool handle_piped_input_ = true;
|
||||
// File descriptor for /dev/tty, used for piped input handling.
|
||||
int tty_fd_ = -1;
|
||||
|
||||
// The style of the cursor to restore on exit.
|
||||
int cursor_reset_shape_ = 1;
|
||||
|
||||
Reference in New Issue
Block a user