From 8a6690b6df990485e88f52f947a513af72a36238 Mon Sep 17 00:00:00 2001 From: Yeechan Lu Date: Fri, 21 Mar 2014 04:32:11 +0800 Subject: [PATCH] Optimize for text selection after pressing Win+R --- Wox/MainWindow.xaml.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Wox/MainWindow.xaml.cs b/Wox/MainWindow.xaml.cs index 566b2b67f4..c11ebf1a44 100644 --- a/Wox/MainWindow.xaml.cs +++ b/Wox/MainWindow.xaml.cs @@ -305,12 +305,14 @@ namespace Wox private void OnWinRPressed() { ShowWox(false); - if (tbQuery.Text != ">") + if (!tbQuery.Text.StartsWith(">")) { resultCtrl.Clear(); ChangeQuery(">"); } tbQuery.CaretIndex = tbQuery.Text.Length; + tbQuery.SelectionStart = 1; + tbQuery.SelectionLength = tbQuery.Text.Length - 1; } private void updateCmdMode()