LazLogger: Optimize indent handling / fix reset indent for DbgOut

git-svn-id: trunk@60263 -
This commit is contained in:
martin 2019-01-31 21:49:14 +00:00
parent 185d63ac35
commit 4ee1459b01

View File

@ -720,14 +720,14 @@ begin
dirty reads should therefore yield the correct value: "true"
*)
if FDebugNestAtBOL and (s <> '') and (FDebugNestLvl <> 0) then begin
EnterCriticalsection(FIndentCriticalSection);
//if FDebugNestAtBOL then
s := FDebugIndent + s;
//FDebugNestAtBOL := (s[length(s)] in [#10,#13]);
LeaveCriticalsection(FIndentCriticalSection);
if s <> '' then begin
if FDebugNestAtBOL and (FDebugNestLvl <> 0) then begin
EnterCriticalsection(FIndentCriticalSection);
s := FDebugIndent + s;
LeaveCriticalsection(FIndentCriticalSection);
end;
FDebugNestAtBOL := (s[length(s)] in [#10,#13]);
end;
FDebugNestAtBOL := (s = '') or (s[length(s)] in [#10,#13]);
if OnDbgOut <> nil then
begin