nano

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

commit a4e7d6b80bf81aa0e9a4d669fbdc6bd8bea4658b
parent 06416e3d5c03b9ad72360b9fda5518a9187b47b2
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 12 Oct 2018 19:55:18 +0200

tweaks: define a symbol to make the code itself a little simpler

Diffstat:
Msrc/global.c | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/global.c b/src/global.c @@ -284,6 +284,11 @@ size_t length_of_list(int menu) #define NOVIEW FALSE #define BLANKAFTER TRUE /* A blank line after this one. */ #define TOGETHER FALSE +#ifdef ENABLE_MULTIBUFFER +#define CAN_OPEN_OTHER_BUFFER TRUE +#else +#define CAN_OPEN_OTHER_BUFFER FALSE +#endif /* Empty functions, for the most part corresponding to toggles. */ void case_sens_void(void) @@ -728,11 +733,7 @@ void shortcut_init(void) N_("Read File"), WITHORSANS(readfile_gist), BLANKAFTER, /* We allow inserting files in view mode if multibuffer mode * is switched on, so that we can view multiple files. */ -#ifdef ENABLE_MULTIBUFFER - VIEW); -#else - NOVIEW); -#endif + CAN_OPEN_OTHER_BUFFER); } else { #ifdef ENABLE_JUSTIFY add_to_funcs(do_justify_void, MMAIN,