mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57:45 +00:00
LibGUI: Add MoveLineUpOrDownCommand
This allows lines moved by Ctrl+Shift+[Up, Down] to be registered as a command, i.e. cancellable by Ctrl+Z. This patch also introduces the usage of TextDocument::[take, insert]_line. Those functions forward changes to the visual lines and then avoid some data mismatch. Co-authored-by: Jorropo <jorropo.pgm@gmail.com>
This commit is contained in:
parent
cf693136e2
commit
7a8104e79b
3 changed files with 145 additions and 55 deletions
|
@ -229,6 +229,12 @@ public:
|
|||
|
||||
virtual Optional<UISize> calculated_min_size() const override;
|
||||
|
||||
template<class T, class... Args>
|
||||
inline void execute(Badge<EditingEngine>, Args&&... args)
|
||||
{
|
||||
execute<T>(forward<Args>(args)...);
|
||||
}
|
||||
|
||||
protected:
|
||||
explicit TextEditor(Type = Type::MultiLine);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue