<p>I am using 1.32 (Ubuntu)<br>
To reproduce:</p>
<ol>
<li>Save a html file</li>
<li>Save As js file</li>
</ol>
<p>bug: The filetype continues html<br>
maybe something like this works:</p>
<p>`diff --git a/src/dialogs.c b/src/dialogs.c<br>
index 7c083512..65721246 100644<br>
--- a/src/dialogs.c<br>
+++ b/src/dialogs.c<br>
@@ -490,6 +490,7 @@ static gboolean handle_save_as(const gchar *utf8_filename, gboolean rename_file)<br>
{<br>
GeanyDocument *doc = document_get_current();<br>
gboolean success = FALSE;</p>
<ul>
<li>
<pre><code>  GeanyFiletype *ft = filetypes_detect_from_document(doc);

  g_return_val_if_fail(doc != NULL, FALSE);
  g_return_val_if_fail(!EMPTY(utf8_filename), FALSE);
</code></pre>
</li>
</ul>
<p>@@ -511,6 +512,8 @@ static gboolean handle_save_as(const gchar *utf8_filename, gboolean rename_file)<br>
success = document_save_file_as(doc, utf8_filename);</p>
<pre><code>    build_menu_update(doc);
</code></pre>
<ul>
<li>
<pre><code>  document_set_filetype(doc, ft);
</code></pre>
</li>
<li>
<pre><code>  return success;
</code></pre>
</li>
</ul>
<p>}<br>
`</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2124">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ-RWYl30u4j49idxyLRL1BbDo1RJks5vg7aYgaJpZM4cu6CM">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJyMltBk0Hy_61wFzhimZQ38XVGvTks5vg7aYgaJpZM4cu6CM.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"\"Save As\" does not update filetype (#2124)"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/2124"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2124",
"url": "https://github.com/geany/geany/issues/2124",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>