Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions EverythingToolbar/Controls/SearchResultsView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down