fix, comment block, wrong indentation when the block included a empty lines

This commit is contained in:
Basile Burg 2016-04-16 21:16:21 +02:00
parent a249081860
commit e3c655eca3
1 changed files with 3 additions and 1 deletions

View File

@ -869,7 +869,7 @@ begin
lx += editor.TabWidth lx += editor.TabWidth
else else
lx += 1; lx += 1;
if lx + 1 < pt.X then if (lx + 1 < pt.X) and not line.isEmpty then
pt.X:= lx + 1; pt.X:= lx + 1;
if (line.length > 1) and (line[1..2] = '//') then if (line.length > 1) and (line[1..2] = '//') then
numUndo += 1; numUndo += 1;
@ -883,6 +883,8 @@ begin
begin begin
pt.Y:= i; pt.Y:= i;
editor.ExecuteCommand(ecGotoXY, '', @pt); editor.ExecuteCommand(ecGotoXY, '', @pt);
while editor.CaretX < pt.X do
editor.ExecuteCommand(ecChar, ' ', nil);
if not undo then if not undo then
begin begin
commentHere; commentHere;