nano

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

commit 9c16be32d75fbd94634f5f374317055559e64714
parent c3cdb099da75c4e23a7483cadfdd34988a0e0663
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon,  5 Apr 2021 16:10:44 +0200

tweaks: reshuffle two conditions, to have the most unlikely one first

This also better fits the preceding comment.

Diffstat:
Msrc/winio.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -1731,8 +1731,8 @@ char *display_string(const char *buf, size_t column, size_t span, #endif /* If the first character starts before the left edge, or would be * overwritten by a "<" token, then show placeholders instead. */ - if (*buf != '\0' && *buf != '\t' && (start_col < column || - (start_col > 0 && isdata && !ISSET(SOFTWRAP)))) { + if ((start_col < column || (start_col > 0 && isdata && !ISSET(SOFTWRAP))) && + *buf != '\0' && *buf != '\t') { if (is_cntrl_char(buf)) { if (start_col < column) { converted[index++] = control_mbrep(buf, isdata);