diff --git a/Flow.Launcher/ViewModel/MainViewModel.cs b/Flow.Launcher/ViewModel/MainViewModel.cs index cc535ea05..9b373d641 100644 --- a/Flow.Launcher/ViewModel/MainViewModel.cs +++ b/Flow.Launcher/ViewModel/MainViewModel.cs @@ -739,9 +739,10 @@ namespace Flow.Launcher.ViewModel } } - private static Query ConstructQuery(string queryText, IEnumerable customShortcuts, IEnumerable builtInShortcuts) + private Query ConstructQuery(string queryText, IEnumerable customShortcuts, IEnumerable builtInShortcuts) { StringBuilder queryBuilder = new(queryText); + StringBuilder queryBuilderTmp = new(queryText); foreach (var shortcut in customShortcuts) { @@ -756,8 +757,13 @@ namespace Flow.Launcher.ViewModel foreach (var shortcut in builtInShortcuts) { queryBuilder.Replace(shortcut.Key, shortcut.Expand()); + queryBuilderTmp.Replace(shortcut.Key, shortcut.Expand()); } + // show expanded builtin shortcuts + // use private field to avoid infinite recursion + _queryText = queryBuilderTmp.ToString(); + var query = QueryBuilder.Build(queryBuilder.ToString().Trim(), PluginManager.NonGlobalPlugins); return query; }