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:
parent
a7ea7b3a66
commit
70eb7aa627
2 changed files with 36 additions and 13 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue