File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 41
41
<KeyBinding Key =" Escape" Command =" {Binding EscCommand}" />
42
42
<KeyBinding Key =" F1" Command =" {Binding StartHelpCommand}" />
43
43
<KeyBinding Key =" F5" Command =" {Binding ReloadPluginDataCommand}" />
44
- <KeyBinding Key =" Tab" Command =" {Binding SelectNextItemCommand }" />
44
+ <KeyBinding Key =" Tab" Command =" {Binding ReplaceQueryWithResult }" />
45
45
<KeyBinding
46
46
Key =" Tab"
47
47
Command =" {Binding SelectPrevItemCommand}"
Original file line number Diff line number Diff line change @@ -228,6 +228,22 @@ private void InitializeKeyCommands()
228
228
}
229
229
} ) ;
230
230
231
+ ReplaceQueryWithResult = new RelayCommand ( index =>
232
+ {
233
+ var results = SelectedResults ;
234
+
235
+ if ( index != null )
236
+ {
237
+ results . SelectedIndex = int . Parse ( index . ToString ( ) ) ;
238
+ }
239
+
240
+ var result = results . SelectedItem ? . Result ;
241
+ if ( result != null ) // SelectedItem returns null if selection is empty.
242
+ {
243
+ ChangeQueryText ( result . Title , true ) ;
244
+ }
245
+ } ) ;
246
+
231
247
LoadContextMenuCommand = new RelayCommand ( _ =>
232
248
{
233
249
if ( SelectedIsFromQueryResults ( ) )
@@ -383,6 +399,7 @@ private ResultsViewModel SelectedResults
383
399
public ICommand OpenSettingCommand { get ; set ; }
384
400
public ICommand ReloadPluginDataCommand { get ; set ; }
385
401
public ICommand ClearQueryCommand { get ; private set ; }
402
+ public ICommand ReplaceQueryWithResult { get ; set ; }
386
403
387
404
public string OpenResultCommandModifiers { get ; private set ; }
388
405
You can’t perform that action at this time.
0 commit comments