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: David Lawrence Ramsey <pooka109@gmail.com>
Этот коммит содержится в:
родитель
c3de3ece32
Коммит
bd770ea2e7
@ -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. */
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user