-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Milestone
Description
When pressing the "Save As" button to save the HTML in the preview panel, the directory and name of the current file should be used to initialize the Save As dialog. Here is a patch:
diff --git a/NppMarkdownPanel/Forms/MarkdownPreviewForm.cs b/NppMarkdownPanel/Forms/MarkdownPreviewForm.cs
index 1fffc1c..eb21a87 100644
--- a/NppMarkdownPanel/Forms/MarkdownPreviewForm.cs
+++ b/NppMarkdownPanel/Forms/MarkdownPreviewForm.cs
@@ -327,6 +327,8 @@ namespace NppMarkdownPanel.Forms
{
saveFileDialog.Filter = "html files (*.html, *.htm)|*.html;*.htm|All files (*.*)|*.*";
saveFileDialog.RestoreDirectory = true;
+ saveFileDialog.InitialDirectory = Path.GetDirectoryName(CurrentFilePath);
+ saveFileDialog.FileName = Path.GetFileNameWithoutExtension(CurrentFilePath);
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
writeHtmlContentToFile(saveFileDialog.FileName);Cheers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels