Terminal: Support clipboard selection

Change-Id: Ief59f9e21782e0dd0292f3625e35c1742cf9b3bc
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-03-17 11:01:49 +01:00
parent 81bd8e3bd8
commit 5972452484
2 changed files with 74 additions and 51 deletions

View File

@@ -51,10 +51,11 @@ public:
{
int start;
int end;
bool final{false};
bool operator!=(const Selection &other) const
{
return start != other.start || end != other.end;
return start != other.start || end != other.end || final != other.final;
}
bool operator==(const Selection &other) const { return !operator!=(other); }
@@ -151,12 +152,12 @@ protected:
TextAndOffsets textAt(const QPoint &pos) const;
void applySizeChange();
void updateScrollBars();
void flushVTerm(bool force);
bool setSelection(const std::optional<Selection> &selection);
QString textFromSelection() const;
void configBlinkTimer();