Commit bd770ea2 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

text: properly unindent lines that consist of only whitespace

The preceding 'for' loop has already established that all the lines are
either unindentable or composed of only blanks.  So if now a line cannot
be unindented, it means it is fully blank, so it can be simply skipped.

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

.
Reported-by: default avatarDavid Lawrence Ramsey <pooka109@gmail.com>
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -413,7 +413,7 @@ void do_unindent(void)
size_t indent_len = length_of_white(f->data);
/* If the line consists of a small amount of whitespace, skip it. */
if (white_string(f->data) && indent_len < tabsize)
if (indent_len == 0)
continue;
/* Remove the first tab's worth of whitespace from this line. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment