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
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;