commit a084ad94f7f59a773ca3dd9c80355a32b1e422b2
parent c15802f8c35f77a413693448eb337f7c8486974d
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Sun, 7 Nov 2004 18:22:33 +0000
in multibuffer mode, using a blank filename at the "Read File" prompt
shouldn't cancel out of it
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/files.c b/src/files.c
@@ -540,7 +540,14 @@ void do_insertfile(
#endif
"./");
- if (i < 0) {
+#ifdef ENABLE_MULTIBUFFER
+ /* If we're in multibuffer mode and the filename is blank, open
+ * a new buffer instead of canceling. */
+ if (i == -1 || (i == -2 && !ISSET(MULTIBUFFER)))
+#else
+ if (i < 0)
+#endif
+ {
statusbar(_("Cancelled"));
break;
} else {