From fc1de8f28c914b2056f6eb09a2701ef4afb75f59 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 29 Jul 2022 18:33:08 +0800 Subject: [PATCH] - fix: inefficient loop when render long lines --- NEWS.md | 1 + RedPandaIDE/qsynedit/TextPainter.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 8caabc6b..83385cd1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -7,6 +7,7 @@ Red Panda C++ Version 1.1.6 - enhancement: choose default language when first run - fix: Drag&Drop no correctly disabled for readonly editors - enhancement: disable column mode in readonly editors + - fix: inefficient loop when render long lines Red Panda C++ Version 1.1.5 diff --git a/RedPandaIDE/qsynedit/TextPainter.cpp b/RedPandaIDE/qsynedit/TextPainter.cpp index e98c2e65..9a118c27 100644 --- a/RedPandaIDE/qsynedit/TextPainter.cpp +++ b/RedPandaIDE/qsynedit/TextPainter.cpp @@ -971,7 +971,7 @@ void SynEditTextPainter::paintLines() if (nTokenColumnsBefore + nTokenColumnLen >= vLastChar) { if (nTokenColumnsBefore >= vLastChar) break; //*** BREAK *** - nTokenColumnLen = vLastChar - nTokenColumnsBefore - 1; + nTokenColumnLen = vLastChar - nTokenColumnsBefore; } // It's at least partially visible. Get the token attributes now. attr = edit->mHighlighter->getTokenAttribute();