mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:27:35 +00:00
LibLine: Implement basic cut-and-paste functionality
Every cut operation (erase last word backward/forward, erase line till start/end) stores the erased characters in `m_last_erased` u32 vector. The last erased characters will get inserted into the buffer when `Ctrl+Y` (`insert_last_erased()` internal function) is pressed.
This commit is contained in:
parent
97bcdba2a5
commit
9d3604215d
3 changed files with 49 additions and 2 deletions
|
@ -124,6 +124,7 @@ struct Configuration {
|
|||
M(transpose_characters) \
|
||||
M(transpose_words) \
|
||||
M(insert_last_words) \
|
||||
M(insert_last_erased) \
|
||||
M(erase_alnum_word_backwards) \
|
||||
M(erase_alnum_word_forwards) \
|
||||
M(capitalize_word) \
|
||||
|
@ -505,6 +506,7 @@ private:
|
|||
RefPtr<Core::Notifier> m_notifier;
|
||||
|
||||
Vector<u32> m_paste_buffer;
|
||||
Vector<u32> m_last_erased;
|
||||
|
||||
bool m_initialized { false };
|
||||
bool m_refresh_needed { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue