mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(insert_spaces_tab): refactor loop.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
d4e59aa022
commit
442af62c07
@ -1447,14 +1447,8 @@ insert_spaces_tab (WEdit * edit, gboolean half)
|
||||
if (half)
|
||||
i /= 2;
|
||||
if (i != 0)
|
||||
{
|
||||
i = ((edit->curs_col / i) + 1) * i - edit->curs_col;
|
||||
while (i > 0)
|
||||
{
|
||||
for (i = ((edit->curs_col / i) + 1) * i - edit->curs_col; i > 0; i -= space_width)
|
||||
edit_insert (edit, ' ');
|
||||
i -= space_width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user