diff --git a/JL.Windows/GUI/PopupWindow.xaml.cs b/JL.Windows/GUI/PopupWindow.xaml.cs index f06cf2f9..1618d846 100644 --- a/JL.Windows/GUI/PopupWindow.xaml.cs +++ b/JL.Windows/GUI/PopupWindow.xaml.cs @@ -1231,10 +1231,11 @@ private async void PrimarySpelling_PreviewMouseUp(object sender, MouseButtonEven } string? selectedDefinitions = GetSelectedDefinitions(_listViewItemIndex); + int listViewItemIndex = _listViewItemIndex; HidePopup(); - await PopupWindowUtils.Mine(LastLookupResults[_listViewItemIndex], _currentText, selectedDefinitions, _currentCharPosition).ConfigureAwait(false); + await PopupWindowUtils.Mine(LastLookupResults[listViewItemIndex], _currentText, selectedDefinitions, _currentCharPosition).ConfigureAwait(false); } private void ShowAddNameWindow()