Minor fix.

Updated efsw.
This commit is contained in:
Martín Lucas Golini
2023-09-03 13:52:25 -03:00
parent 9f64a2149f
commit 13e2f20dd8
3 changed files with 6 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ void FontFamily::loadFromRegular( FontTrueType* font, std::string overwriteFontN
std::string fontname( overwriteFontName.empty()
? FileSystem::fileRemoveExtension( font->getInfo().filename )
: overwriteFontName );
if ( String::endsWith( fontname, "-Regular" ) ) {
if ( String::endsWith( fontname, "-Regular" ) || String::endsWith( fontname, "-regular" ) ) {
auto pos( fontname.find_last_of( '-' ) );
fontname.resize( pos );
}

View File

@@ -319,7 +319,6 @@ void UICodeEditor::draw() {
}
for ( unsigned long i = lineRange.first; i <= lineRange.second; i++ ) {
Lock l( mDoc->getHighlighter()->getLinesMutex() );
Vector2f curScroll(
{ startScroll.x, static_cast<float>( startScroll.y + lineHeight * (double)i ) } );
@@ -327,7 +326,10 @@ void UICodeEditor::draw() {
for ( auto& plugin : mPlugins )
plugin->drawBeforeLineText( this, i, curScroll, charSize, lineHeight );
drawLineText( i, curScroll, charSize, lineHeight );
{
Lock l( mDoc->getHighlighter()->getLinesMutex() );
drawLineText( i, curScroll, charSize, lineHeight );
}
for ( auto& plugin : mPlugins )
plugin->drawAfterLineText( this, i, curScroll, charSize, lineHeight );