(is_blank): refactor loop.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2023-12-17 17:18:03 +03:00
parent 1152a232fb
commit d8a93bcc86
1 changed files with 3 additions and 3 deletions

View File

@ -685,12 +685,12 @@ is_blank (const edit_buffer_t * buf, off_t offset)
off_t s, f;
s = edit_buffer_get_bol (buf, offset);
f = edit_buffer_get_eol (buf, offset) - 1;
while (s <= f)
f = edit_buffer_get_eol (buf, offset);
for (; s < f; s++)
{
int c;
c = edit_buffer_get_byte (buf, s++);
c = edit_buffer_get_byte (buf, s);
if (!isspace (c))
return FALSE;
}