Correct the title highlighting of hbox grabing to top border

This commit is contained in:
Clement Roblot 2024-11-26 21:47:01 +07:00
parent 9a94abc31d
commit 907e146385

View File

@ -67,17 +67,14 @@ class Text : public Node {
}
screen.PixelAt(x, y).character = cell;
if (has_selection) {
if((x >= selection_start_) && (x <= selection_end_)) {
screen.PixelAt(x, y).inverted = true;
}
}
++x;
}
if (!has_selection) {
return;
}
// Invert the selection
for(int x = selection_start_; x <= selection_end_; x++) {
screen.PixelAt(x, y).inverted = true;
}
}
private: