SynEdit: (Un)Indent current line, if no selection. Issue #0019724

git-svn-id: trunk@32049 -
This commit is contained in:
martin 2011-08-25 11:08:14 +00:00
parent bfdb46c6b6
commit df270d4561

View File

@ -7798,13 +7798,17 @@ var
end;
begin
if not SelAvail then exit;
IncPaintLock;
FBlockSelection.IncPersistentLock;
try
// build text to insert
BB := BlockBegin;
BE := BlockEnd;
if not SelAvail then begin
BB := CaretXY;
BE := CaretXY;
end else begin
BB := BlockBegin;
BE := BlockEnd;
end;
if (BE.X = 1) then
e := BE.y - 1
else
@ -7859,10 +7863,13 @@ var
end;
begin
if not SelAvail then exit;
BB := BlockBegin;
BE := BlockEnd;
if not SelAvail then begin
BB := CaretXY;
BE := CaretXY;
end else begin
BB := BlockBegin;
BE := BlockEnd;
end;
// convert selection to complete lines
if BE.X = 1 then
e := BE.y - 1