mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:17:35 +00:00
TextEditor: Add vim status indicators to the statusbar
When using the VimEditingEngine in the TextEditor, vim's mode and the previous key are shown in the editor's statusbar.
This commit is contained in:
parent
e11ec20650
commit
bd6d0d2295
10 changed files with 171 additions and 20 deletions
|
@ -150,6 +150,8 @@ public:
|
|||
Function<void()> on_down_pressed;
|
||||
Function<void()> on_pageup_pressed;
|
||||
Function<void()> on_pagedown_pressed;
|
||||
Function<void()> on_vim_statusbar_messages_changed;
|
||||
Function<void()> on_editing_engine_changed;
|
||||
|
||||
Action& undo_action() { return *m_undo_action; }
|
||||
Action& redo_action() { return *m_redo_action; }
|
||||
|
@ -195,6 +197,9 @@ public:
|
|||
|
||||
void delete_text_range(TextRange);
|
||||
|
||||
String vim_mode_statusbar_message() const { return m_vim_mode_statusbar_message; }
|
||||
String vim_previous_keys_statusbar_message() const { return m_vim_previous_keys_statusbar_message; }
|
||||
|
||||
protected:
|
||||
explicit TextEditor(Type = Type::MultiLine);
|
||||
|
||||
|
@ -351,6 +356,9 @@ private:
|
|||
Gfx::IntPoint m_last_mousemove_position;
|
||||
|
||||
RefPtr<Gfx::Bitmap> m_icon;
|
||||
|
||||
String m_vim_mode_statusbar_message {};
|
||||
String m_vim_previous_keys_statusbar_message {};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue