]> git.wh0rd.org Git - nano.git/commitdiff
in multibuffer mode, using a blank filename at the "Read File" prompt
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sun, 7 Nov 2004 18:22:33 +0000 (18:22 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sun, 7 Nov 2004 18:22:33 +0000 (18:22 +0000)
shouldn't cancel out of it

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/files.c

index 1d0b11e8229807c782e3e2d0e34cd638fee96cec..f993e8d1e11674353f35cc886922ad565ce6c414 100644 (file)
@@ -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 {