mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-03 23:48:40 +01:00
codetools: auto indent: fixed using atom at cursor, not beyond
git-svn-id: trunk@22347 -
This commit is contained in:
parent
5a3eeb2008
commit
f9301bebcb
@ -1078,13 +1078,16 @@ function TFullyAutomaticBeautifier.FindStackPosForBlockCloseAtPos(
|
||||
var
|
||||
AtomStart: integer;
|
||||
r: PChar;
|
||||
p: LongInt;
|
||||
begin
|
||||
Result:=Stack.Top;
|
||||
if Result<0 then exit;
|
||||
if (CleanPos<1) or (CleanPos>length(Source))
|
||||
or (Source[CleanPos] in [' ',#9]) then
|
||||
or (Source[CleanPos] in [#0..#31,' ']) then
|
||||
exit;
|
||||
ReadRawNextPascalAtom(Source,CleanPos,AtomStart,NestedComments);
|
||||
p:=CleanPos;
|
||||
ReadRawNextPascalAtom(Source,p,AtomStart,NestedComments);
|
||||
if AtomStart<>p then exit;
|
||||
DebugLn(['TFullyAutomaticBeautifier.FindStackPosForBlockCloseAtPos Atom=',copy(Source,AtomStart,CleanPos-AtomStart)]);
|
||||
r:=@Source[AtomStart];
|
||||
case UpChars[r^] of
|
||||
|
||||
Loading…
Reference in New Issue
Block a user