Skip to content

Commit

Permalink
Merge pull request microsoft#90 from jjw24/fix_folderplugin_missingac…
Browse files Browse the repository at this point in the history
…tionkeyword

Add action keyword when changing query in Folder plugin
  • Loading branch information
jjw24 authored Dec 8, 2019
2 parents 4d902c0 + 6c4ab3b commit ddbf23d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Plugins/Wox.Plugin.Folder/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public List<Result> Query(Query query)
return results;
}

private Result CreateFolderResult(string title, string path)
private Result CreateFolderResult(string title, string path, string queryActionKeyword)
{
return new Result
{
Expand All @@ -82,7 +82,7 @@ private Result CreateFolderResult(string title, string path)
}
string changeTo = path.EndsWith("\\") ? path : path + "\\";
_context.API.ChangeQuery(changeTo);
_context.API.ChangeQuery(queryActionKeyword + " " + changeTo);
return false;
}
};
Expand All @@ -93,7 +93,7 @@ private List<Result> GetUserFolderResults(Query query)
string search = query.Search.ToLower();
var userFolderLinks = _settings.FolderLinks.Where(
x => x.Nickname.StartsWith(search, StringComparison.OrdinalIgnoreCase));
var results = userFolderLinks.Select(item => CreateFolderResult(item.Nickname, item.Path))
var results = userFolderLinks.Select(item => CreateFolderResult(item.Nickname, item.Path, query.ActionKeyword))
.ToList();
return results;
}
Expand Down Expand Up @@ -166,7 +166,7 @@ private List<Result> QueryInternal_Directory_Exists(Query query)

var result =
fileSystemInfo is DirectoryInfo
? CreateFolderResult(fileSystemInfo.Name, fileSystemInfo.FullName)
? CreateFolderResult(fileSystemInfo.Name, fileSystemInfo.FullName, query.ActionKeyword)
: CreateFileResult(fileSystemInfo.FullName);
results.Add(result);
}
Expand Down

0 comments on commit ddbf23d

Please sign in to comment.