Undo previous commit, as it caused a graphical glitch when a paragraph spanned multiple lines

This commit is contained in:
Yousef Khadadeh 2025-10-03 08:43:47 +03:00
parent cfe91411d7
commit 7333ddc9d8

View file

@ -482,10 +482,7 @@ void Editor::paint(SkCanvas* c, PaintOpts options) {
{
assert(pos.fParagraphIndex < fLines.size());
const TextParagraph& l = fLines[pos.fParagraphIndex];
SkRect selectionRect = offset(l.fCursorPos[pos.fTextByteIndex], l.fOrigin);
if(pos.fParagraphIndex < fLines.size() - 1)
selectionRect.fBottom = fLines[pos.fParagraphIndex + 1].fOrigin.y();
c->drawRect(selectionRect, selection);
c->drawRect(offset(l.fCursorPos[pos.fTextByteIndex], l.fOrigin), selection);
}
if(fLines.size() > 0)