nano

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

commit 6866ea0d0e0a8650a21199347b2da072508ca1d6
parent 34d38fe1c68802914634042bdd9cd9433efb1e3b
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 23 Mar 2020 11:00:17 +0100

justify: skip over in-line whitespace only, not over leading whitespace

This fixes https://savannah.gnu.org/bugs/?58028.

Bug existed since commit 107abd26 from yesterday.

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

diff --git a/src/text.c b/src/text.c @@ -1772,8 +1772,8 @@ void do_justify(bool full_justify) if (0 < end_x && end_x < fore_len) end_x = fore_len; - /* Advance over blanks after the region. */ - while (is_blank_char(&endline->data[end_x])) + /* When not at the left edge, advance over blanks after the region. */ + while (end_x > 0 && is_blank_char(&endline->data[end_x])) end_x = step_right(endline->data, end_x); sampleline = startline;