From cd243f558afc500acfdb272cc672f127767ac6f3 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Fri, 19 May 2006 23:27:16 +0000 Subject: [PATCH] in break_line(), handle newlines consistently when searching for the last blank in the first group of blanks in the range of (goal - 1) git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 3 +++ src/text.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index ed16645a..df274f65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -225,6 +225,9 @@ CVS code - break_line() - Fix problem where tab widths in columns would always be calculated as tabsize. (DLR, found by Alexey Toptygin) + - Handle newlines consistently when searching for the last blank + in the first group of blanks in the range of (goal - 1). (DLR, + found by Benno Schulenberg) do_justify() - Remove redundant key checks. (DLR) do_spell() diff --git a/src/text.c b/src/text.c index 67ce15f4..e30ee203 100644 --- a/src/text.c +++ b/src/text.c @@ -848,6 +848,11 @@ ssize_t break_line(const char *line, ssize_t goal )) { line_len = parse_mbchar(line, NULL, NULL); +#ifndef DISABLE_HELP + if (newline && *line == '\n') + break; +#endif + line += line_len; blank_loc += line_len; } -- 2.39.5