Fix command palette not displaying all available commands.

Minor very rare crash in Debugger when unloading the plugin.
Formatter will try to refresh the semantic highlighting after a document format.
This commit is contained in:
Martín Lucas Golini
2025-02-13 20:00:13 -03:00
parent b3ed22c666
commit dc927e07c0
3 changed files with 12 additions and 6 deletions

View File

@@ -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<Action::UniqueID>( 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<Action::UniqueID>( editor ) );
}
void DebuggerPlugin::displayTooltip( UICodeEditor* editor, const std::string& expression,
const EvaluateInfo& info, const Vector2f& position ) {
if ( mHoverTooltip == nullptr ) {