mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
LibLine: Read configuration from a config file
This commit is contained in:
parent
afbeb8f977
commit
d0aab41628
3 changed files with 35 additions and 4 deletions
|
@ -78,6 +78,8 @@ struct Configuration {
|
|||
void set(RefreshBehaviour refresh) { refresh_behaviour = refresh; }
|
||||
void set(OperationMode mode) { operation_mode = mode; }
|
||||
|
||||
static Configuration from_config(const StringView& libname = "line");
|
||||
|
||||
RefreshBehaviour refresh_behaviour { RefreshBehaviour::Lazy };
|
||||
OperationMode operation_mode { OperationMode::Unset };
|
||||
};
|
||||
|
@ -178,7 +180,7 @@ public:
|
|||
const Utf32View buffer_view() const { return { m_buffer.data(), m_buffer.size() }; }
|
||||
|
||||
private:
|
||||
explicit Editor(Configuration configuration = {});
|
||||
explicit Editor(Configuration configuration = Configuration::from_config());
|
||||
|
||||
enum VTState {
|
||||
Free = 1,
|
||||
|
@ -365,8 +367,10 @@ private:
|
|||
HashMap<char, NonnullOwnPtr<KeyCallback>> m_key_callbacks;
|
||||
|
||||
// TODO: handle signals internally.
|
||||
struct termios m_termios {};
|
||||
struct termios m_default_termios {};
|
||||
struct termios m_termios {
|
||||
};
|
||||
struct termios m_default_termios {
|
||||
};
|
||||
bool m_was_interrupted { false };
|
||||
bool m_was_resized { false };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue