Search by regex, modal Enter fixes
This commit is contained in:
@@ -30,11 +30,9 @@ public class FrequencyNavigationViewModel : FuzzyPanelViewModel<string>, IFreque
|
||||
public void Close()
|
||||
=> _frequencyNavigationService.CloseNavigationWindow();
|
||||
|
||||
public override async Task<bool> HandleKeyDown(KeyEventArgs keyEventArgs)
|
||||
public async Task<bool> HandleKeyUp(KeyEventArgs keyEventArgs)
|
||||
{
|
||||
var handled = await base.HandleKeyDown(keyEventArgs);
|
||||
|
||||
if (handled) return true;
|
||||
if (keyEventArgs.Handled) return false;
|
||||
|
||||
if (keyEventArgs.Key == Key.Enter)
|
||||
{
|
||||
@@ -49,6 +47,23 @@ public class FrequencyNavigationViewModel : FuzzyPanelViewModel<string>, IFreque
|
||||
return false;
|
||||
}
|
||||
|
||||
public override async Task<bool> HandleKeyDown(KeyEventArgs keyEventArgs)
|
||||
{
|
||||
if (keyEventArgs.Handled) return false;
|
||||
var handled = await base.HandleKeyDown(keyEventArgs);
|
||||
|
||||
if (handled) return true;
|
||||
|
||||
if (keyEventArgs.Key == Key.Escape)
|
||||
{
|
||||
keyEventArgs.Handled = true;
|
||||
Close();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void UpdateFilteredMatches() =>
|
||||
FilteredMatches = new List<string>(_frequencyNavigationService.GetMatchingContainers(SearchText));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user