diff --git a/Flow.Launcher/MainWindow.xaml b/Flow.Launcher/MainWindow.xaml
index f5fd729d45b..2a5b7057953 100644
--- a/Flow.Launcher/MainWindow.xaml
+++ b/Flow.Launcher/MainWindow.xaml
@@ -244,7 +244,8 @@
Style="{DynamicResource QueryBoxStyle}"
Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Visibility="Visible"
- WindowChrome.IsHitTestVisibleInChrome="True">
+ WindowChrome.IsHitTestVisibleInChrome="True"
+ Loaded="SelectAllQueryText">
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 8ca153afc34..51ac56c77c3 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -293,6 +293,11 @@ private void OnLoaded(object sender, RoutedEventArgs _)
break;
}
};
+
+ if (_settings.SelectAllQueryOnReopen)
+ {
+ SelectAllQueryText();
+ }
}
private void InitializePosition()
@@ -852,5 +857,10 @@ private void QueryTextBox_KeyUp(object sender, KeyEventArgs e)
be.UpdateSource();
}
}
+
+ private void SelectAllQueryText()
+ {
+ QueryTextBox.SelectAll();
+ }
}
}
diff --git a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
index 3d94355e687..39a6ff3a005 100644
--- a/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
+++ b/Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
@@ -25,6 +25,7 @@ public SettingsPaneGeneralViewModel(Settings settings, Updater updater, IPortabl
_updater = updater;
_portable = portable;
UpdateEnumDropdownLocalizations();
+ SelectAllQueryOnReopen = settings.SelectAllQueryOnReopen; // Pfa33
}
public class SearchWindowScreenData : DropdownDataGeneric { }
@@ -54,6 +55,11 @@ public bool StartFlowLauncherOnSystemStartup
}
}
+ public bool SelectAllQueryOnReopen // Pbff7
+ {
+ get => Settings.SelectAllQueryOnReopen;
+ set => Settings.SelectAllQueryOnReopen = value;
+ }
public List SearchWindowScreens { get; } =
DropdownDataGeneric.GetValues("SearchWindowScreen");
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index a81d9e0d108..abbf18c8930 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -1,4 +1,4 @@
-