nano

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

commit eca5856d999f4be8edec7120109fe272d24027e0
parent 190221c91cbf1ce67bf4fbb509c7c1258179b259
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 18 Feb 2024 15:02:51 +0100

tweaks: remove two pairs of unneeded braces, and normalize a line

Diffstat:
Msrc/chars.c | 4++--
Msrc/text.c | 3+--
Msrc/winio.c | 3+--
3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/chars.c b/src/chars.c @@ -98,10 +98,10 @@ bool is_blank_char(const char *c) bool is_cntrl_char(const char *c) { #ifdef ENABLE_UTF8 - if (use_utf8) { + if (use_utf8) return ((c[0] & 0xE0) == 0 || c[0] == DEL_CODE || ((signed char)c[0] == -62 && (signed char)c[1] < -96)); - } else + else #endif return ((*c & 0x60) == 0 || *c == DEL_CODE); } diff --git a/src/text.c b/src/text.c @@ -1849,9 +1849,8 @@ void justify_text(bool whole_buffer) { /* When justifying the entire buffer, start at the top. Otherwise, when * in a paragraph but not at its beginning, move back to its first line. */ - if (whole_buffer) { + if (whole_buffer) openfile->current = openfile->filetop; - } else if (inpar(openfile->current) && !begpar(openfile->current, 0)) do_para_begin(&openfile->current); diff --git a/src/winio.c b/src/winio.c @@ -721,8 +721,7 @@ int convert_CSI_sequence(const int *seq, size_t length, int *consumed) if (seq[2] == '3') return ALT_INSERT; #endif - } - else if (length > 4 && seq[2] == ';' && seq[4] == '~') + } else if (length > 4 && seq[2] == ';' && seq[4] == '~') /* Esc [ 2 n ; 2 ~ == F21...F24 on some terminals. */ *consumed = 5; #ifndef NANO_TINY