diff --git a/src/eepp/ui/doc/textdocument.cpp b/src/eepp/ui/doc/textdocument.cpp index 87c6c27bf..b3aaaf4a0 100644 --- a/src/eepp/ui/doc/textdocument.cpp +++ b/src/eepp/ui/doc/textdocument.cpp @@ -1065,6 +1065,9 @@ String TextDocument::getAllSelectedText() const { std::vector TextDocument::getCommandList() const { std::vector cmds; + cmds.reserve( mCommands.size() + mRefCommands.size() ); + for ( const auto& cmd : mRefCommands ) + cmds.push_back( cmd.first ); for ( const auto& cmd : mCommands ) cmds.push_back( cmd.first ); return cmds; diff --git a/src/tools/ecode/plugins/debugger/debuggerplugin.cpp b/src/tools/ecode/plugins/debugger/debuggerplugin.cpp index 75228f1d1..96a93b627 100644 --- a/src/tools/ecode/plugins/debugger/debuggerplugin.cpp +++ b/src/tools/ecode/plugins/debugger/debuggerplugin.cpp @@ -70,6 +70,12 @@ static constexpr auto KEY_DEFAULT_BUILD_TASK = "${defaultBuildTask}"; static constexpr auto KEY_PATH_SEPARATOR = "${pathSeparator}"; static constexpr auto KEY_PATH_SEPARATOR_ABBR = "${/}"; +// Mouse Hover Tooltip +static Action::UniqueID getMouseMoveHash( UICodeEditor* editor ) { + return hashCombine( String::hash( "DebuggerPlugin::onMouseMove-" ), + reinterpret_cast( editor ) ); +} + Plugin* DebuggerPlugin::New( PluginManager* pluginManager ) { return eeNew( DebuggerPlugin, ( pluginManager, false ) ); } @@ -1406,6 +1412,8 @@ void DebuggerPlugin::onUnregisterEditor( UICodeEditor* editor ) { editor->removeUnlockedCommands( DebuggerCommandList ); editor->unregisterGutterSpace( this ); + + editor->removeActionsByTag( getMouseMoveHash( editor ) ); } void DebuggerPlugin::drawLineNumbersBefore( UICodeEditor* editor, @@ -2175,12 +2183,6 @@ void DebuggerPlugin::setUIDebuggingState( StatusDebuggerController::State state } } -// Mouse Hover Tooltip -static Action::UniqueID getMouseMoveHash( UICodeEditor* editor ) { - return hashCombine( String::hash( "DebuggerPlugin::onMouseMove-" ), - reinterpret_cast( editor ) ); -} - void DebuggerPlugin::displayTooltip( UICodeEditor* editor, const std::string& expression, const EvaluateInfo& info, const Vector2f& position ) { if ( mHoverTooltip == nullptr ) { diff --git a/src/tools/ecode/plugins/formatter/formatterplugin.cpp b/src/tools/ecode/plugins/formatter/formatterplugin.cpp index 8a1824bdb..854e5add6 100644 --- a/src/tools/ecode/plugins/formatter/formatterplugin.cpp +++ b/src/tools/ecode/plugins/formatter/formatterplugin.cpp @@ -400,6 +400,7 @@ void FormatterPlugin::formatDoc( UICodeEditor* editor ) { doc->textInput( data, false ); doc->setSelection( pos ); editor->setScroll( scroll ); + doc->execute( "lsp-refresh-semantic-highlighting", editor ); if ( mAutoFormatOnSave && mPluginManager && !String::startsWith( doc->getFilePath(), mPluginManager->getPluginsPath() ) ) {