mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 13:09:28 +02:00
SynEdit: (Un)Indent current line, if no selection - fix if caret at BOL. Issue #0019724
git-svn-id: trunk@32139 -
This commit is contained in:
parent
32102f58e7
commit
55f3a736d6
@ -98,6 +98,7 @@ const
|
||||
// SynDefaultFont is determined in InitSynDefaultFont()
|
||||
SynDefaultFontName: String = '';
|
||||
SynDefaultFontHeight: Integer = 13;
|
||||
SynDefaultFontSize: Integer = 10;
|
||||
SynDefaultFontPitch: TFontPitch = fpFixed;
|
||||
SynDefaultFontQuality: TFontQuality = fqNonAntialiased;
|
||||
|
||||
@ -7809,14 +7810,14 @@ begin
|
||||
if not SelAvail then begin
|
||||
BB := CaretXY;
|
||||
BE := CaretXY;
|
||||
e := BE.y;
|
||||
end else begin
|
||||
BB := BlockBegin;
|
||||
BE := BlockEnd;
|
||||
if (BE.X = 1)
|
||||
then e := BE.y - 1
|
||||
else e := BE.y;
|
||||
end;
|
||||
if (BE.X = 1) then
|
||||
e := BE.y - 1
|
||||
else
|
||||
e := BE.y;
|
||||
|
||||
Spaces := StringOfChar(#32, fBlockIndent);
|
||||
fUndoList.Lock;
|
||||
@ -7870,15 +7871,16 @@ begin
|
||||
if not SelAvail then begin
|
||||
BB := CaretXY;
|
||||
BE := CaretXY;
|
||||
e := BE.y;
|
||||
end else begin
|
||||
BB := BlockBegin;
|
||||
BE := BlockEnd;
|
||||
// convert selection to complete lines
|
||||
if BE.X = 1 then
|
||||
e := BE.y - 1
|
||||
else
|
||||
e := BE.y;
|
||||
end;
|
||||
// convert selection to complete lines
|
||||
if BE.X = 1 then
|
||||
e := BE.y - 1
|
||||
else
|
||||
e := BE.y;
|
||||
|
||||
IncPaintLock;
|
||||
FBlockSelection.IncPersistentLock;
|
||||
|
Loading…
Reference in New Issue
Block a user