From 7c67dc922c5924edd4de5f414d87eb9eb28b852a Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Fri, 12 Jul 2024 09:22:30 -0400 Subject: [PATCH] nemo-view.c: Don't create a zero-length Empty Document. This avoids these files being given an x-zerosize mimetype, preserving their traditional behavior. Adding a newline is something an editor would do anyhow, once the file is given actual content. ref: linuxmint/mint22-beta#26 ref: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3053 ref: linuxmint/xed@3239b902a546 --- src/nemo-view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nemo-view.c b/src/nemo-view.c index 8c24634db..1a2dc6844 100644 --- a/src/nemo-view.c +++ b/src/nemo-view.c @@ -2124,8 +2124,8 @@ nemo_view_new_file (NemoView *directory_view, nemo_view_new_file_with_initial_contents (directory_view, parent_uri != NULL ? parent_uri : container_uri, NULL, - NULL, - 0, + "\n", + 1, NULL); g_free (container_uri); return;