1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

Shell: Add an option to autosave history every N ms

...and set it to 10 seconds by default.
This commit is contained in:
Ali Mohammad Pur 2021-05-11 11:42:36 +04:30 committed by Linus Groh
parent 4d01183f5c
commit a527256356
4 changed files with 45 additions and 0 deletions

View file

@ -276,6 +276,8 @@ private:
Shell();
virtual ~Shell() override;
void timer_event(Core::TimerEvent&) override;
// FIXME: Port to Core::Property
void save_to(JsonObject&);
void bring_cursor_to_beginning_of_a_line() const;
@ -347,6 +349,8 @@ private:
bool m_default_constructed { false };
mutable bool m_last_continuation_state { false }; // false == not needed.
Optional<size_t> m_history_autosave_time;
};
[[maybe_unused]] static constexpr bool is_word_character(char c)