diff --git a/EverythingToolbar/Controls/SearchResultsView.xaml.cs b/EverythingToolbar/Controls/SearchResultsView.xaml.cs index 661bd14ca..f90dd3ac9 100644 --- a/EverythingToolbar/Controls/SearchResultsView.xaml.cs +++ b/EverythingToolbar/Controls/SearchResultsView.xaml.cs @@ -428,6 +428,17 @@ private void OpenWithCustomAction(object sender, RoutedEventArgs e) private void OnListViewItemMouseDown(object sender, MouseButtonEventArgs e) { _dragStart = PointToScreen(Mouse.GetPosition(this)); + + // Right-clicking a result should act on that result, not on the + // currently selected one. WPF does not move the selection on + // right-click, so sync it here, before the context menu opens. + if ( + e.ChangedButton == MouseButton.Right + && sender is ListViewItem { DataContext: SearchResult } item + ) + { + item.IsSelected = true; + } } private void OnListViewItemMouseMove(object sender, MouseEventArgs e)