From fce3b3ae3d7ebb59747e3a94fb4011acce325141 Mon Sep 17 00:00:00 2001 From: Odotocodot <48138990+Odotocodot@users.noreply.github.com> Date: Sat, 18 Jan 2025 13:18:48 +0000 Subject: [PATCH] Fix crash on theme search --- Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs index ca19bd33d..3ea90197d 100644 --- a/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs +++ b/Plugins/Flow.Launcher.Plugin.Sys/ThemeSelector.cs @@ -26,8 +26,7 @@ namespace Flow.Launcher.Plugin.Sys LoadThemes(); } - int keywordIndex = query.Search.IndexOf(Keyword, StringComparison.Ordinal); - string search = query.Search[(keywordIndex + Keyword.Length + 1)..]; + string search = query.SecondToEndSearch; if (string.IsNullOrWhiteSpace(search)) { @@ -52,7 +51,7 @@ namespace Flow.Launcher.Plugin.Sys } private void LoadThemes() - => themes = ThemeManager.Instance.LoadAvailableThemes().Select(Path.GetFileNameWithoutExtension); + => themes = ThemeManager.Instance.LoadAvailableThemes().Select(x => x.FileNameWithoutExtension); private static Result CreateThemeResult(string theme) => CreateThemeResult(theme, 0, null);