Initial commit

This commit is contained in:
Garulf 2021-12-03 11:59:40 -05:00
parent 2e6797937c
commit 87c069bfaf
2 changed files with 16 additions and 1 deletions

View file

@ -469,6 +469,15 @@ namespace Flow.Launcher
e.Handled = true;
}
break;
case Key.Back:
if (_viewModel.SelectedIsFromQueryResults()
&& QueryTextBox.CaretIndex == QueryTextBox.Text.Length
&& !string.IsNullOrEmpty(QueryTextBox.Text) && QueryTextBox.Text.Contains(":\\"))
{
_viewModel.BackspaceCommand.Execute(null);
e.Handled = true;
}
break;
default:
break;

View file

@ -20,7 +20,7 @@ using Flow.Launcher.Infrastructure.Logger;
using Microsoft.VisualStudio.Threading;
using System.Threading.Channels;
using ISavable = Flow.Launcher.Plugin.ISavable;
using System.IO;
namespace Flow.Launcher.ViewModel
{
@ -228,6 +228,11 @@ namespace Flow.Launcher.ViewModel
}
});
BackspaceCommand = new RelayCommand(index =>
{
ChangeQueryText(Path.GetDirectoryName(QueryText));
});
LoadContextMenuCommand = new RelayCommand(_ =>
{
if (SelectedIsFromQueryResults())
@ -371,6 +376,7 @@ namespace Flow.Launcher.ViewModel
public double MainWindowWidth => _settings.WindowSize;
public ICommand EscCommand { get; set; }
public ICommand BackspaceCommand { get; set; }
public ICommand SelectNextItemCommand { get; set; }
public ICommand SelectPrevItemCommand { get; set; }
public ICommand SelectNextPageCommand { get; set; }