From 810ff41c48ab1cd5af32aa2cb2b6bdf7300aff3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Mon, 26 Feb 2024 16:28:07 -0300 Subject: [PATCH] Fixed lines cache check. --- src/eepp/ui/uicodeeditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eepp/ui/uicodeeditor.cpp b/src/eepp/ui/uicodeeditor.cpp index 8134ee6db..4e06bffa1 100644 --- a/src/eepp/ui/uicodeeditor.cpp +++ b/src/eepp/ui/uicodeeditor.cpp @@ -1563,7 +1563,7 @@ Float UICodeEditor::getLineWidth( const Int64& lineIndex ) { if ( mFont && !mFont->isMonospace() ) { auto line = mDoc->line( lineIndex ); auto found = mLinesWidthCache.find( lineIndex ); - if ( found != mLinesWidthCache.end() && line.getHash() == found->first ) + if ( found != mLinesWidthCache.end() && line.getHash() == found->second.first ) return found->second.second; Float width = getTextWidth( line.getText() ) + getGlyphWidth(); mLinesWidthCache[lineIndex] = { line.getHash(), width };