mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 06:39:13 +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()
|
// SynDefaultFont is determined in InitSynDefaultFont()
|
||||||
SynDefaultFontName: String = '';
|
SynDefaultFontName: String = '';
|
||||||
SynDefaultFontHeight: Integer = 13;
|
SynDefaultFontHeight: Integer = 13;
|
||||||
|
SynDefaultFontSize: Integer = 10;
|
||||||
SynDefaultFontPitch: TFontPitch = fpFixed;
|
SynDefaultFontPitch: TFontPitch = fpFixed;
|
||||||
SynDefaultFontQuality: TFontQuality = fqNonAntialiased;
|
SynDefaultFontQuality: TFontQuality = fqNonAntialiased;
|
||||||
|
|
||||||
@ -7809,14 +7810,14 @@ begin
|
|||||||
if not SelAvail then begin
|
if not SelAvail then begin
|
||||||
BB := CaretXY;
|
BB := CaretXY;
|
||||||
BE := CaretXY;
|
BE := CaretXY;
|
||||||
|
e := BE.y;
|
||||||
end else begin
|
end else begin
|
||||||
BB := BlockBegin;
|
BB := BlockBegin;
|
||||||
BE := BlockEnd;
|
BE := BlockEnd;
|
||||||
|
if (BE.X = 1)
|
||||||
|
then e := BE.y - 1
|
||||||
|
else e := BE.y;
|
||||||
end;
|
end;
|
||||||
if (BE.X = 1) then
|
|
||||||
e := BE.y - 1
|
|
||||||
else
|
|
||||||
e := BE.y;
|
|
||||||
|
|
||||||
Spaces := StringOfChar(#32, fBlockIndent);
|
Spaces := StringOfChar(#32, fBlockIndent);
|
||||||
fUndoList.Lock;
|
fUndoList.Lock;
|
||||||
@ -7870,15 +7871,16 @@ begin
|
|||||||
if not SelAvail then begin
|
if not SelAvail then begin
|
||||||
BB := CaretXY;
|
BB := CaretXY;
|
||||||
BE := CaretXY;
|
BE := CaretXY;
|
||||||
|
e := BE.y;
|
||||||
end else begin
|
end else begin
|
||||||
BB := BlockBegin;
|
BB := BlockBegin;
|
||||||
BE := BlockEnd;
|
BE := BlockEnd;
|
||||||
|
// convert selection to complete lines
|
||||||
|
if BE.X = 1 then
|
||||||
|
e := BE.y - 1
|
||||||
|
else
|
||||||
|
e := BE.y;
|
||||||
end;
|
end;
|
||||||
// convert selection to complete lines
|
|
||||||
if BE.X = 1 then
|
|
||||||
e := BE.y - 1
|
|
||||||
else
|
|
||||||
e := BE.y;
|
|
||||||
|
|
||||||
IncPaintLock;
|
IncPaintLock;
|
||||||
FBlockSelection.IncPersistentLock;
|
FBlockSelection.IncPersistentLock;
|
||||||
|
Loading…
Reference in New Issue
Block a user