Don't remove keybindings of formatter and linter plugins if any document is still open.

Converting from UTF8 now checks for BOM UTF8 strings.
This commit is contained in:
Martín Lucas Golini
2023-09-15 23:47:47 -03:00
parent 044e289ba8
commit 2e80cdb77e
6 changed files with 60 additions and 23 deletions

View File

@@ -2331,9 +2331,11 @@ void App::onCodeEditorCreated( UICodeEditor* editor, TextDocument& doc ) {
if ( !appInstance )
return;
UICodeEditor* editor = event->getNode()->asType<UICodeEditor>();
updateEditorTabTitle( editor );
editor->getDocument().resetSyntax();
editor->setSyntaxDefinition( editor->getDocument().getSyntaxDefinition() );
editor->runOnMainThread( [this, editor] {
updateEditorTabTitle( editor );
editor->getDocument().resetSyntax();
editor->setSyntaxDefinition( editor->getDocument().getSyntaxDefinition() );
} );
} );
auto docChanged = [this]( const Event* event ) {