fix and improve show all commands on " " behavior

This commit is contained in:
xxSeys1
2025-06-04 15:23:42 +02:00
parent c9fe9213b3
commit c4130aa20f

View File

@@ -335,7 +335,15 @@ namespace FlaxEditor.Windows
if (isWhitespaceOnly)
DebugCommands.GetAllCommands(out commands);
ShowPopup(ref _searchPopup, isWhitespaceOnly ? commands : matches, isWhitespaceOnly ? commands[0] : text);
ShowPopup(ref _searchPopup, isWhitespaceOnly ? commands : matches, text);
if (isWhitespaceOnly)
{
// Scroll to and select first item for consistent behaviour
var firstItem = _searchPopup.ItemsPanel.Children[0] as Item;
_searchPopup.ScrollToAndHighlightItemByName(firstItem.Name);
}
return;
}
}