diff --git a/ChangeLog b/ChangeLog index f239dd3c312d4d9cdb0489cec6b573a04e647c58..144188e4c8bac3a38974c97ce404dda98f58767b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * src/color.c (set_colorpairs): Improve comments and rename vars. * src/files.c (read_line): Chop a superfluous bool -- 'prevnode' being NULL is enough indication that the first line is being read. + * src/files.c (switch_to_prevnext_buffer): Tweak comment and var name. 2015-12-11 Benno Schulenberg <bensberg@justemail.net> * doc/syntax/Makefile.am: Add missing autoconf and nftables syntaxes. diff --git a/src/files.c b/src/files.c index a3a7471e8b2e48b141f6d84677d0332b7b21e753..53e1b97e8a42a87858ebe4a55ab705199cf01e84 100644 --- a/src/files.c +++ b/src/files.c @@ -466,23 +466,21 @@ void display_buffer(void) } #ifndef DISABLE_MULTIBUFFER -/* Switch to the next file buffer if next_buf is TRUE. Otherwise, - * switch to the previous file buffer. */ -void switch_to_prevnext_buffer(bool next_buf, bool quiet) +/* Switch to a neighbouring file buffer; to the next if to_next is TRUE; + * otherwise, to the previous one. */ +void switch_to_prevnext_buffer(bool to_next, bool quiet) { assert(openfile != NULL); - /* If only one file buffer is open, indicate it on the statusbar and - * get out. */ + /* If only one file buffer is open, say so and get out. */ if (openfile == openfile->next) { - if (quiet == FALSE) + if (!quiet) statusbar(_("No more open file buffers")); return; } - /* Switch to the next or previous file buffer, depending on the - * value of next_buf. */ - openfile = next_buf ? openfile->next : openfile->prev; + /* Switch to the next or previous file buffer. */ + openfile = to_next ? openfile->next : openfile->prev; #ifdef DEBUG fprintf(stderr, "filename is %s\n", openfile->filename); @@ -492,7 +490,7 @@ void switch_to_prevnext_buffer(bool next_buf, bool quiet) display_buffer(); /* Indicate the switch on the statusbar. */ - if (quiet == FALSE) + if (!quiet) statusbar(_("Switched to %s"), ((openfile->filename[0] == '\0') ? _("New Buffer") : openfile->filename));