mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
use previous directory command
This commit is contained in:
parent
0363cbcf74
commit
03ae0b868e
2 changed files with 6 additions and 3 deletions
|
|
@ -18,6 +18,7 @@ using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
|||
using NotifyIcon = System.Windows.Forms.NotifyIcon;
|
||||
using Flow.Launcher.Infrastructure;
|
||||
using Flow.Launcher.Infrastructure.Hotkey;
|
||||
using Flow.Launcher.Plugin.SharedCommands;
|
||||
|
||||
namespace Flow.Launcher
|
||||
{
|
||||
|
|
@ -476,7 +477,7 @@ namespace Flow.Launcher
|
|||
{
|
||||
if (_viewModel.SelectedIsFromQueryResults()
|
||||
&& QueryTextBox.CaretIndex == QueryTextBox.Text.Length
|
||||
&& !string.IsNullOrEmpty(QueryTextBox.Text) && QueryTextBox.Text.Contains(":\\"))
|
||||
&& FilesFolders.IsLocationPathString(QueryTextBox.Text))
|
||||
{
|
||||
|
||||
_viewModel.BackspaceCommand.Execute(null);
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ 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
|
||||
{
|
||||
|
|
@ -230,7 +229,10 @@ namespace Flow.Launcher.ViewModel
|
|||
|
||||
BackspaceCommand = new RelayCommand(index =>
|
||||
{
|
||||
ChangeQueryText(Path.GetDirectoryName(QueryText));
|
||||
var path = QueryText;
|
||||
|
||||
// GetPreviousExistingDirectory does not require trailing '\', otherwise will return empty string
|
||||
ChangeQueryText(FilesFolders.GetPreviousExistingDirectory(FilesFolders.IsLocationPathString, path.TrimEnd('\\')));
|
||||
});
|
||||
|
||||
LoadContextMenuCommand = new RelayCommand(_ =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue