mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:37:36 +00:00
LibVT: Enable TerminalWidget copy/paste menu actions conditionally
The copy action is now only enabled if there is a selection. The paste action is now only enabled if the clipboard contains something the terminal considers pasteable - that is, non-empty data with a text/* MIME-type. Previously we'd happily paste things like bitmaps into the terminal, causing it to blow up.
This commit is contained in:
parent
886fe7e69f
commit
6b7061d00b
2 changed files with 31 additions and 1 deletions
|
@ -130,6 +130,9 @@ private:
|
|||
|
||||
void relayout(const Gfx::IntSize&);
|
||||
|
||||
void update_copy_action();
|
||||
void update_paste_action();
|
||||
|
||||
Gfx::IntSize compute_base_size() const;
|
||||
int first_selection_column_on_row(int row) const;
|
||||
int last_selection_column_on_row(int row) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue