Skip to content

Commit 9ccdf59

Browse files
change text textbox when expanding builtin shortcuts
1 parent 224b1df commit 9ccdf59

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,10 @@ async Task QueryTask(PluginPair plugin)
739739
}
740740
}
741741

742-
private static Query ConstructQuery(string queryText, IEnumerable<CustomShortcutModel> customShortcuts, IEnumerable<BuiltinShortcutModel> builtInShortcuts)
742+
private Query ConstructQuery(string queryText, IEnumerable<CustomShortcutModel> customShortcuts, IEnumerable<BuiltinShortcutModel> builtInShortcuts)
743743
{
744744
StringBuilder queryBuilder = new(queryText);
745+
StringBuilder queryBuilderTmp = new(queryText);
745746

746747
foreach (var shortcut in customShortcuts)
747748
{
@@ -756,8 +757,13 @@ private static Query ConstructQuery(string queryText, IEnumerable<CustomShortcut
756757
foreach (var shortcut in builtInShortcuts)
757758
{
758759
queryBuilder.Replace(shortcut.Key, shortcut.Expand());
760+
queryBuilderTmp.Replace(shortcut.Key, shortcut.Expand());
759761
}
760762

763+
// show expanded builtin shortcuts
764+
// use private field to avoid infinite recursion
765+
_queryText = queryBuilderTmp.ToString();
766+
761767
var query = QueryBuilder.Build(queryBuilder.ToString().Trim(), PluginManager.NonGlobalPlugins);
762768
return query;
763769
}

0 commit comments

Comments
 (0)