mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 03:19:17 +02:00
SynEdit: (Un)Indent current line, if no selection. Issue #0019724
git-svn-id: trunk@32049 -
This commit is contained in:
parent
bfdb46c6b6
commit
df270d4561
@ -7798,13 +7798,17 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not SelAvail then exit;
|
|
||||||
IncPaintLock;
|
IncPaintLock;
|
||||||
FBlockSelection.IncPersistentLock;
|
FBlockSelection.IncPersistentLock;
|
||||||
try
|
try
|
||||||
// build text to insert
|
// build text to insert
|
||||||
|
if not SelAvail then begin
|
||||||
|
BB := CaretXY;
|
||||||
|
BE := CaretXY;
|
||||||
|
end else begin
|
||||||
BB := BlockBegin;
|
BB := BlockBegin;
|
||||||
BE := BlockEnd;
|
BE := BlockEnd;
|
||||||
|
end;
|
||||||
if (BE.X = 1) then
|
if (BE.X = 1) then
|
||||||
e := BE.y - 1
|
e := BE.y - 1
|
||||||
else
|
else
|
||||||
@ -7859,10 +7863,13 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not SelAvail then exit;
|
if not SelAvail then begin
|
||||||
|
BB := CaretXY;
|
||||||
|
BE := CaretXY;
|
||||||
|
end else begin
|
||||||
BB := BlockBegin;
|
BB := BlockBegin;
|
||||||
BE := BlockEnd;
|
BE := BlockEnd;
|
||||||
|
end;
|
||||||
// convert selection to complete lines
|
// convert selection to complete lines
|
||||||
if BE.X = 1 then
|
if BE.X = 1 then
|
||||||
e := BE.y - 1
|
e := BE.y - 1
|
||||||
|
Loading…
Reference in New Issue
Block a user