nano

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

commit dad2b5541e513fff53ef7e80229153600de0cdd8
parent 56960ce05ee87c865e40d7e93eb106ded0faceb3
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 10 Mar 2020 10:49:07 +0100

tweaks: rename a variable, for aptness

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

diff --git a/src/text.c b/src/text.c @@ -1875,16 +1875,16 @@ void do_justify(bool full_justify) linestruct *line = cutbuffer; size_t quot_len = quote_length(line->data); size_t fore_len = quot_len + indent_length(line->data + quot_len); - size_t line_len = strlen(line->data) - fore_len; + size_t text_len = strlen(line->data) - fore_len; /* If the extracted region begins with any leading part, trim it. */ if (fore_len > 0) - memmove(line->data, line->data + fore_len, line_len + 1); + memmove(line->data, line->data + fore_len, text_len + 1); /* Then copy back in the leading part that it should have. */ if (lead_len > 0) { - cutbuffer->data = charealloc(cutbuffer->data, line_len + lead_len + 1); - memmove(cutbuffer->data + lead_len, cutbuffer->data, line_len + 1); + cutbuffer->data = charealloc(cutbuffer->data, lead_len + text_len + 1); + memmove(cutbuffer->data + lead_len, cutbuffer->data, text_len + 1); strncpy(cutbuffer->data, the_lead, lead_len); }