From 7333ddc9d80c28159bd3e8c41e645e5158614dce Mon Sep 17 00:00:00 2001 From: Yousef Khadadeh Date: Fri, 3 Oct 2025 08:43:47 +0300 Subject: [PATCH] Undo previous commit, as it caused a graphical glitch when a paragraph spanned multiple lines --- src/CollabTextBox/CollabTextBox.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/CollabTextBox/CollabTextBox.cpp b/src/CollabTextBox/CollabTextBox.cpp index 134a763..e5e2ae5 100644 --- a/src/CollabTextBox/CollabTextBox.cpp +++ b/src/CollabTextBox/CollabTextBox.cpp @@ -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)