mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-16 07:52:50 +03:00
Single instance support (tested in Linux and Windows, pending the rest of the OSes, issue SpartanJ/ecode#58).
Refresh buttons state when Clear Menu is used (issue SpartanJ/ecode#339).
This commit is contained in:
@@ -251,25 +251,27 @@ LSPClientPlugin::~LSPClientPlugin() {
|
||||
mShuttingDown = true;
|
||||
mManager->unsubscribeMessages( this );
|
||||
unsubscribeFileSystemListener();
|
||||
Lock l( mDocMutex );
|
||||
for ( const auto& editor : mEditors ) {
|
||||
for ( auto& kb : mKeyBindings ) {
|
||||
editor.first->getKeyBindings().removeCommandKeybind( kb.first );
|
||||
if ( editor.first->hasDocument() )
|
||||
editor.first->getDocument().removeCommand( kb.first );
|
||||
{
|
||||
Lock l( mDocMutex );
|
||||
for ( const auto& editor : mEditors ) {
|
||||
for ( auto& kb : mKeyBindings ) {
|
||||
editor.first->getKeyBindings().removeCommandKeybind( kb.first );
|
||||
if ( editor.first->hasDocument() )
|
||||
editor.first->getDocument().removeCommand( kb.first );
|
||||
}
|
||||
for ( auto listener : editor.second )
|
||||
editor.first->removeEventListener( listener );
|
||||
if ( mBreadcrumb )
|
||||
editor.first->unregisterTopSpace( this );
|
||||
editor.first->unregisterPlugin( this );
|
||||
}
|
||||
for ( auto listener : editor.second )
|
||||
editor.first->removeEventListener( listener );
|
||||
if ( mBreadcrumb )
|
||||
editor.first->unregisterTopSpace( this );
|
||||
editor.first->unregisterPlugin( this );
|
||||
}
|
||||
if ( nullptr == mManager->getSplitter() )
|
||||
return;
|
||||
for ( const auto& editor : mEditorsTags ) {
|
||||
if ( mManager->getSplitter()->editorExists( editor.first ) ) {
|
||||
for ( const auto& tag : editor.second )
|
||||
editor.first->removeActionsByTag( tag );
|
||||
if ( nullptr == mManager->getSplitter() )
|
||||
return;
|
||||
for ( const auto& editor : mEditorsTags ) {
|
||||
if ( mManager->getSplitter()->editorExists( editor.first ) ) {
|
||||
for ( const auto& tag : editor.second )
|
||||
editor.first->removeActionsByTag( tag );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user