1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

LibLine: Check if operating on a TTY before using TTY features

This makes the line editor behave well when input is passed in from
pipes as well.
This commit is contained in:
AnotherTest 2020-08-05 09:58:47 +04:30 committed by Andreas Kling
parent a7ea7b3a66
commit 70eb7aa627
2 changed files with 36 additions and 13 deletions

View file

@ -61,8 +61,10 @@ struct Configuration {
Eager,
};
enum OperationMode {
Unset,
Full,
NoEscapeSequences,
NonInteractive,
};
Configuration()
@ -82,7 +84,7 @@ struct Configuration {
RefreshBehaviour refresh_behaviour { RefreshBehaviour::Lazy };
TokenSplitMechanism split_mechanism { TokenSplitMechanism::Spaces };
OperationMode operation_mode { OperationMode::Full };
OperationMode operation_mode { OperationMode::Unset };
};
class Editor : public Core::Object {