From a71a2f9a0c72fd34cb7c8d9e2641193614af0923 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 23 Jun 2017 09:51:58 +0200
Subject: [PATCH] startup: don't mark the buffer as modified when nothing was
 read

---
 src/nano.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/nano.c b/src/nano.c
index a74c0ecd..fe038f5c 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1176,7 +1176,10 @@ bool scoop_stdin(void)
 
     terminal_init();
     doupdate();
-    set_modified();
+
+    if (openfile->totsize > 0)
+	set_modified();
+
     return TRUE;
 }
 
-- 
GitLab