mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 01:56:31 +03:00
Fix language selection.
This commit is contained in:
@@ -2318,7 +2318,7 @@ void App::createDocManyLangsAlert( UICodeEditor* editor ) {
|
||||
btn->setText( lang->getLanguageName() );
|
||||
btn->setLayoutMarginRight( PixelDensity::dpToPx( 8 ) );
|
||||
btn->onClick( [this, editor, lang, docAlert, ext]( auto ) {
|
||||
editor->getDocument().setSyntaxDefinition( *lang );
|
||||
editor->setSyntaxDefinition( *lang );
|
||||
editor->disableReportSizeChangeToChilds();
|
||||
docAlert->close();
|
||||
editor->setFocus();
|
||||
@@ -2634,7 +2634,7 @@ void App::onCodeEditorCreated( UICodeEditor* editor, TextDocument& doc ) {
|
||||
if ( hasConfig != mConfig.languagesExtensions.priorities.end() &&
|
||||
( def = SyntaxDefinitionManager::instance()->getPtrByLSPName(
|
||||
hasConfig->second ) ) ) {
|
||||
editor->getDocument().setSyntaxDefinition( *def );
|
||||
editor->setSyntaxDefinition( *def );
|
||||
} else {
|
||||
createDocManyLangsAlert( editor );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user