From 3d459ad83db91ad7c396081643ae4a921bdc29c7 Mon Sep 17 00:00:00 2001
From: Chris Allegretta <chrisa@asty.org>
Date: Wed, 22 Jan 2003 01:09:40 +0000
Subject: [PATCH] nano.c:main() - Call load_file with arg 0 for insert, as we
 aren't really doing an insert, allows new_file() to run if we open a non-file
 at startup

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1382 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog | 6 +++++-
 nano.c    | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4a606061..8296d212 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
 CVS Code -
 - nano.c:
-  usage():
+  main()
+	- Call load_file with arg 0 for insert, as we aren't really
+	  doing an insert, allows new_file() to run if we open a 
+	  non-file at startup.
+  usage()
   	- Remove gettext markings from -p/--preserve (Jordi).
   do_preserve_msg():
 	- Unsplit error message into a single fprintf call (Jordi).
diff --git a/nano.c b/nano.c
index 4da521d1..f8684723 100644
--- a/nano.c
+++ b/nano.c
@@ -3421,7 +3421,7 @@ int main(int argc, char *argv[])
     fprintf(stderr, _("Main: open file\n"));
 #endif
 
-    open_file(filename, 1, 1);
+    open_file(filename, 0, 1);
 #ifdef ENABLE_MULTIBUFFER
     /* If we're using multibuffers and more than one file is specified
        on the command line, load them all and switch to the first one
-- 
GitLab