@LiquidCake commented on this pull request.


> @@ -258,19 +296,26 @@ static void backupcopy_document_save_cb(GObject *obj, 
> GeanyDocument *doc, gpoint
 }
 
 
+static GeanyFiletype *get_doc_filetype_or_default(GeanyDocument *doc) {
+       GeanyFiletype *ft = doc->file_type;
+
+       if (ft == NULL || ft->id == GEANY_FILETYPES_NONE)
+               /* ft is NULL when a new file without template was opened, so 
use the
+                       * configured default file type */
+               ft = 
filetypes_lookup_by_name(untitled_document_save_default_ft);
+       

done

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3911#discussion_r1852751739
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3911/review/[email protected]>

Reply via email to