mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-21 02:02:54 +03:00
Fixed lines cache check.
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user