[Github-comments] [geany/geany] "Save As" does not update filetype (#2124)
tivrfoa
notifications at xxxxx
Sun Apr 14 23:15:36 UTC 2019
I am using 1.32 (Ubuntu)
To reproduce:
1) Save a html file
2) Save As js file
bug: The filetype continues html
maybe something like this works:
`diff --git a/src/dialogs.c b/src/dialogs.c
index 7c083512..65721246 100644
--- a/src/dialogs.c
+++ b/src/dialogs.c
@@ -490,6 +490,7 @@ static gboolean handle_save_as(const gchar *utf8_filename, gboolean rename_file)
{
GeanyDocument *doc = document_get_current();
gboolean success = FALSE;
+ GeanyFiletype *ft = filetypes_detect_from_document(doc);
g_return_val_if_fail(doc != NULL, FALSE);
g_return_val_if_fail(!EMPTY(utf8_filename), FALSE);
@@ -511,6 +512,8 @@ static gboolean handle_save_as(const gchar *utf8_filename, gboolean rename_file)
success = document_save_file_as(doc, utf8_filename);
build_menu_update(doc);
+ document_set_filetype(doc, ft);
+
return success;
}
`
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2124
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190414/4102a0d9/attachment.html>
More information about the Github-comments
mailing list