fix: Taskbar menu items showing up in command palette

This commit is contained in:
WerWolv
2026-03-03 22:45:13 +01:00
parent 4b07f7745b
commit c1cdef7ca1

View File

@@ -370,7 +370,13 @@ namespace hex::plugin::builtin {
std::vector<std::string> names; std::vector<std::string> names;
std::transform(entry.unlocalizedNames.begin(), entry.unlocalizedNames.end(), std::back_inserter(names), [](auto &name) { return Lang(name); }); std::transform(entry.unlocalizedNames.begin(), entry.unlocalizedNames.end(), std::back_inserter(names), [](auto &name) { return Lang(name); });
if (auto combined = wolv::util::combineStrings(names, " -> "); hex::containsIgnoreCase(combined, input) && !combined.contains(ContentRegistry::UserInterface::impl::SeparatorValue) && !combined.contains(ContentRegistry::UserInterface::impl::SubMenuValue)) { auto combined = wolv::util::combineStrings(names, " -> ");
if (
hex::containsIgnoreCase(combined, input) &&
!combined.contains(ContentRegistry::UserInterface::impl::SeparatorValue) &&
!combined.contains(ContentRegistry::UserInterface::impl::SubMenuValue) &&
!combined.contains(ContentRegistry::UserInterface::impl::TaskBarMenuValue)
) {
result.emplace_back(ContentRegistry::CommandPalette::impl::QueryResult { result.emplace_back(ContentRegistry::CommandPalette::impl::QueryResult {
std::move(combined), std::move(combined),
[&entry](const auto&) { entry.callback(); } [&entry](const auto&) { entry.callback(); }