commit ea844d28fe101d028ea1e5970729dcd595e02c32
parent 7668bfe6f23e18a9dab80017ce9f5b8be9cfa7e9
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 22 Apr 2019 19:38:19 +0200
tweaks: exclude a bit more code from a single-buffer build
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/files.c b/src/files.c
@@ -64,26 +64,25 @@ void make_new_buffer(void)
{
openfilestruct *newnode = nmalloc(sizeof(openfilestruct));
+#ifdef ENABLE_MULTIBUFFER
if (openfile == NULL) {
/* Make the first open file the only element in the list. */
-#ifdef ENABLE_MULTIBUFFER
newnode->prev = newnode;
newnode->next = newnode;
-#endif
+
firstfile = newnode;
} else {
/* Add the new open file after the current one in the list. */
-#ifdef ENABLE_MULTIBUFFER
newnode->prev = openfile;
newnode->next = openfile->next;
openfile->next->prev = newnode;
openfile->next = newnode;
-#endif
+
/* There is more than one file open: show "Close" in help lines. */
exitfunc->desc = close_tag;
more_than_one = !inhelp || more_than_one;
}
-
+#endif
/* Make the new buffer the current one, and start initializing it. */
openfile = newnode;