commit 107abd26545addcc855cb2db3adae2dbef14a46c
parent f528ced22b8876c748c25b0c885e4734f7b78d3a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 22 Mar 2020 16:56:50 +0100
justify: skip over blanks after the region, to not skew the indentation
This fixes https://savannah.gnu.org/bugs/?58023.
Bug existed since commit 3225c71e from six days ago.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/text.c b/src/text.c
@@ -1772,6 +1772,10 @@ 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]))
+ end_x++;
+
sampleline = startline;
/* Find the first line of the paragraph in which the region starts. */