nano

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

commit a7083d632bdbaaebf223a536bff6ec0c501adebe
parent 44ea37573a7a24e477a616db73cdd1e1a4276781
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 19 Nov 2018 13:49:35 +0100

tweaks: improve a comment, and add an intermediate variable for clarity

Diffstat:
Msrc/text.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/text.c b/src/text.c @@ -2018,13 +2018,14 @@ bool begpar(const filestruct *const line, int depth) return !begpar(line->prev, depth + 1); } -/* Return TRUE when the given line is part of a paragraph. */ +/* Return TRUE when the given line is part of a paragraph: when it + * contains something more than quoting and leading whitespace. */ bool inpar(const filestruct *const line) { size_t quote_len = quote_length(line->data); + size_t indent_len = indent_length(line->data + quote_len); - return (line->data[quote_len + - indent_length(line->data + quote_len)] != '\0'); + return (line->data[quote_len + indent_len] != '\0'); } /* Find the beginning of the current paragraph if we're in one, or the