forked from qt-creator/qt-creator
Terminal: Fix selections
Selections were invisible if a cell with a background color was selected. Changes to the terminal did not reliably reset the selection. Change-Id: I923223f43e5ee1b6576966f9dd791aa109ac1d5f Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -56,6 +56,8 @@ public:
|
||||
{
|
||||
return start != other.start || end != other.end;
|
||||
}
|
||||
|
||||
bool operator==(const Selection &other) const { return !operator!=(other); }
|
||||
};
|
||||
|
||||
struct LinkSelection : public Selection
|
||||
@@ -111,7 +113,10 @@ protected:
|
||||
void paintCells(QPainter &painter, QPaintEvent *event) const;
|
||||
void paintCursor(QPainter &painter) const;
|
||||
void paintPreedit(QPainter &painter) const;
|
||||
void paintSelection(QPainter &painter) const;
|
||||
void paintSelectionOrBackground(QPainter &painter,
|
||||
const Internal::TerminalCell &cell,
|
||||
const QRectF &cellRect,
|
||||
const QPoint gridPos) const;
|
||||
void paintDebugSelection(QPainter &painter, const Selection &selection) const;
|
||||
|
||||
qreal topMargin() const;
|
||||
@@ -148,7 +153,7 @@ protected:
|
||||
|
||||
void flushVTerm(bool force);
|
||||
|
||||
void setSelection(const std::optional<Selection> &selection);
|
||||
bool setSelection(const std::optional<Selection> &selection);
|
||||
|
||||
void configBlinkTimer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user