nano

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

commit e35b6636abf9a3687f7ce01d29e51b8cdb87f2d2
parent bd4eed9cb10c1680f94b8642cd982eb59af5ef9d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 17 Nov 2021 10:49:27 +0100

tweaks: reshuffle a line and adjust indentation after previous change

Diffstat:
Msrc/nano.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1067,6 +1067,8 @@ void regenerate_screen(void) /* Invert the given global flag and adjust things for its new value. */ void toggle_this(int flag) { + bool enabled = !ISSET(flag); + TOGGLE(flag); focusing = FALSE; @@ -1126,12 +1128,10 @@ void toggle_this(int flag) if ((ISSET(MINIBAR) || ISSET(ZERO)) && (flag == NO_HELP || flag == LINE_NUMBERS)) return; - bool enabled = ISSET(flag); - - if (flag == NO_HELP || flag == NO_SYNTAX) - enabled = !enabled; + if (flag == NO_HELP || flag == NO_SYNTAX) + enabled = !enabled; - statusline(REMARK, "%s %s", _(flagtostr(flag)), + statusline(REMARK, "%s %s", _(flagtostr(flag)), enabled ? _("enabled") : _("disabled")); } #endif /* !NANO_TINY */