mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
Vim: Added a Basic Implementation of Visual Mode
This commit is contained in:
parent
4981b30ea5
commit
dfa3f5fbc8
Notes:
sideshowbarker
2024-07-18 22:56:50 +09:00
Author: https://github.com/supex0fan
Commit: dfa3f5fbc8
Pull-request: https://github.com/SerenityOS/serenity/pull/4998
2 changed files with 175 additions and 1 deletions
|
@ -41,18 +41,25 @@ private:
|
|||
enum VimMode {
|
||||
Normal,
|
||||
Insert,
|
||||
Visual
|
||||
};
|
||||
|
||||
VimMode m_vim_mode { VimMode::Normal };
|
||||
|
||||
TextPosition m_selection_start_position {};
|
||||
void update_selection_on_cursor_move();
|
||||
void clear_visual_mode_data();
|
||||
|
||||
KeyCode m_previous_key {};
|
||||
void switch_to_normal_mode();
|
||||
void switch_to_insert_mode();
|
||||
void switch_to_visual_mode();
|
||||
void move_half_page_up(const KeyEvent& event);
|
||||
void move_half_page_down(const KeyEvent& event);
|
||||
|
||||
bool on_key_in_insert_mode(const KeyEvent& event);
|
||||
bool on_key_in_normal_mode(const KeyEvent& event);
|
||||
bool on_key_in_visual_mode(const KeyEvent& event);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue