nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 69bd4d1f065f1ebcb15a2360fadbc741a9440bf8
parent d3429a7a573c832ec2e6dc7731ba6cd2c6fa196e
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sun,  1 Jan 2017 15:04:51 +0100

tweaks: slightly condense a function and its comment

Diffstat:
Msrc/files.c | 13++++---------
1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/files.c b/src/files.c @@ -1296,21 +1296,16 @@ void do_insertfile(void) free(given); } -/* Insert a file into a new buffer or the current buffer, depending on - * whether the MULTIBUFFER flag is set. If we're in view mode, only - * allow inserting a file into a new buffer. */ +/* If the current mode of operation allows it, go insert a file. */ void do_insertfile_void(void) { - if (ISSET(RESTRICTED)) { + if (ISSET(RESTRICTED)) show_restricted_warning(); - return; - } - #ifndef DISABLE_MULTIBUFFER - if (ISSET(VIEW_MODE) && !ISSET(MULTIBUFFER)) + else if (ISSET(VIEW_MODE) && !ISSET(MULTIBUFFER)) statusbar(_("Key invalid in non-multibuffer mode")); - else #endif + else do_insertfile(); }