mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 14:36:09 +02:00
SynEdit, beautifier: fixed in indent, in cases where newline was inserted at pos 1
git-svn-id: trunk@20700 -
This commit is contained in:
parent
690665dd68
commit
063dd74efc
@ -248,11 +248,18 @@ begin
|
||||
else
|
||||
y := ACaret.LinePos + 1;
|
||||
|
||||
Indent := GetIntend(y, b);
|
||||
s := GetCharMix(y, Indent, '', b);
|
||||
if (FIndentType = sbitPositionCaret) and (FCurrentLines[y] = '') then
|
||||
s := '';
|
||||
FCurrentLines.EditInsert(1, y, s);
|
||||
if (Command = ecLineBreak) and
|
||||
(FCurrentLines[y-2] = '') and (FCurrentLines[y-1] <> '')
|
||||
then
|
||||
Indent := 0
|
||||
else
|
||||
Indent := GetIntend(y, b);
|
||||
if Indent > 0 then begin
|
||||
s := GetCharMix(y, Indent, '', b);
|
||||
if (FIndentType = sbitPositionCaret) and (FCurrentLines[y-1] = '') then
|
||||
s := '';
|
||||
FCurrentLines.EditInsert(1, y, s);
|
||||
end;
|
||||
|
||||
if (Command = ecLineBreak) then begin
|
||||
ACaret.IncForcePastEOL;
|
||||
|
Loading…
Reference in New Issue
Block a user