Add customized editor path

This commit is contained in:
Hongtao Zhang 2022-08-16 18:51:03 -04:00
parent 6df3bd8275
commit 6a5509bc80
No known key found for this signature in database
GPG key ID: 75F655B91C7AC9BB

View file

@ -248,7 +248,7 @@ namespace Flow.Launcher.Plugin.Explorer
private Result CreateOpenWithEditorResult(SearchResult record)
{
string editorPath = "Notepad.exe"; // TODO add the ability to create a custom editor
string editorPath = Settings.EditorPath;
var name = Context.API.GetTranslation("plugin_explorer_openwitheditor")
+ " " + Path.GetFileNameWithoutExtension(editorPath);
@ -265,7 +265,7 @@ namespace Flow.Launcher.Plugin.Explorer
}
catch (Exception e)
{
var message = $"Failed to open editor for file at {record.FullPath}";
var message = $"Failed to open editor for file at {record.FullPath} with Editor {Path.GetFileNameWithoutExtension(editorPath)} at {editorPath}";
LogException(message, e);
Context.API.ShowMsgError(message);
return false;