From 47f7c1478c83722f69af7771fa6f587821011d81 Mon Sep 17 00:00:00 2001 From: Ilya Molchanov Date: Sun, 16 Sep 2012 11:09:04 +0400 Subject: [PATCH] Ticket #303 (don't indent blank lines) don't indent blank lines. Signed-off-by: Ilia Maslakov --- src/editor/edit.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/editor/edit.c b/src/editor/edit.c index 3dfd22e2a..0ca793f96 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -1672,11 +1672,14 @@ edit_move_block_to_right (WEdit * edit) do { edit_cursor_move (edit, cur_bol - edit->curs1); - if (option_fill_tabs_with_spaces) - insert_spaces_tab (edit, option_fake_half_tabs); - else - edit_insert (edit, '\t'); - edit_cursor_move (edit, edit_bol (edit, cur_bol) - edit->curs1); + if (!line_is_blank (edit, edit->curs_line)) + { + if (option_fill_tabs_with_spaces) + insert_spaces_tab (edit, option_fake_half_tabs); + else + edit_insert (edit, '\t'); + edit_cursor_move (edit, edit_bol (edit, cur_bol) - edit->curs1); + } if (cur_bol == 0) break;