Commit 830f4168 authored by Luis Javier Merino's avatar Luis Javier Merino Committed by Kurt Hindenburg
Browse files

Fix copying one single char

Regression introduced by 5919c1fd.  The selection range is inclusive in
both ends.

Thanks to Chiitoo for reporting and to Yerrey Dev for proposing a
solution.

BUG: 448144
parent 2b2dbdfd
Pipeline #121976 passed with stage
in 1 minute and 57 seconds
......@@ -92,7 +92,7 @@ void Emulation::checkScreenInUse()
void Emulation::checkSelectedText()
{
bool isEmpty = _currentScreen->isSelectionEmpty();
bool isEmpty = !_currentScreen->hasSelection();
Q_EMIT selectionChanged(isEmpty);
}
......
......@@ -1425,15 +1425,6 @@ bool Screen::isSelected(const int x, const int y) const
return pos >= _selTopLeft && pos <= _selBottomRight && columnInSelection;
}
bool Screen::isSelectionEmpty() const
{
if (!isSelectionValid()) {
return true;
}
return _selTopLeft == _selBottomRight;
}
QString Screen::selectedText(const DecodingOptions options) const
{
if (!isSelectionValid()) {
......
......@@ -467,7 +467,6 @@ public:
*/
bool isSelected(const int x, const int y) const;
bool isSelectionEmpty() const;
/**
* Convenience method. Returns the currently selected text.
* @param options See Screen::DecodingOptions
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment