From e3c655eca35430f7124d3b8e2d67b55cdc999f85 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sat, 16 Apr 2016 21:16:21 +0200 Subject: [PATCH] fix, comment block, wrong indentation when the block included a empty lines --- src/ce_synmemo.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index 08594d45..df913441 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -869,7 +869,7 @@ begin lx += editor.TabWidth else lx += 1; - if lx + 1 < pt.X then + if (lx + 1 < pt.X) and not line.isEmpty then pt.X:= lx + 1; if (line.length > 1) and (line[1..2] = '//') then numUndo += 1; @@ -883,6 +883,8 @@ begin begin pt.Y:= i; editor.ExecuteCommand(ecGotoXY, '', @pt); + while editor.CaretX < pt.X do + editor.ExecuteCommand(ecChar, ' ', nil); if not undo then begin commentHere;