mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-31 18:46:29 +03:00
ecode:
Fix in LSP Client, incorrectly unbinding commands from document. Emscripten improvements (clipboard).
This commit is contained in:
@@ -1183,14 +1183,12 @@ void LSPClientPlugin::getSymbolInfo( UICodeEditor* editor ) {
|
||||
}
|
||||
|
||||
void LSPClientPlugin::onUnregister( UICodeEditor* editor ) {
|
||||
for ( auto& kb : mKeyBindings ) {
|
||||
for ( auto& kb : mKeyBindings )
|
||||
editor->getKeyBindings().removeCommandKeybind( kb.first );
|
||||
if ( editor->hasDocument() )
|
||||
editor->getDocument().removeCommand( kb.first );
|
||||
}
|
||||
|
||||
if ( mShuttingDown )
|
||||
return;
|
||||
|
||||
Lock l( mDocMutex );
|
||||
TextDocument* doc = &editor->getDocument();
|
||||
const auto& cbs = mEditors[editor];
|
||||
@@ -1204,6 +1202,11 @@ void LSPClientPlugin::onUnregister( UICodeEditor* editor ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( editor->hasDocument() ) {
|
||||
for ( auto& kb : mKeyBindings )
|
||||
editor->getDocument().removeCommand( kb.first );
|
||||
}
|
||||
|
||||
{
|
||||
Lock lds( mDocSymbolsMutex );
|
||||
mDocSymbols.erase( doc->getURI() );
|
||||
|
||||
Reference in New Issue
Block a user