mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Left trim query split marker to avoid whitespaces in log window. Fixes issue #2460.
This commit is contained in:
@@ -311,6 +311,7 @@ var
|
||||
const
|
||||
StringEnclosers = ['"', '''', '`'];
|
||||
NewLines = [#13, #10];
|
||||
WhiteSpaces = NewLines + [#9, ' '];
|
||||
begin
|
||||
// Scan SQL batch for delimiters and return a list with start + end offsets
|
||||
AllLen := Length(SQL);
|
||||
@@ -379,6 +380,8 @@ begin
|
||||
QueryTest := Trim(Copy(SQL, LastLeftOffset, RightOffset-LastLeftOffset));
|
||||
if (QueryTest <> '') and (QueryTest <> Delim) then begin
|
||||
Marker := TSQLSentence.Create;
|
||||
while CharInSet(SQL[LastLeftOffset], WhiteSpaces) do
|
||||
Inc(LastLeftOffset);
|
||||
Marker.LeftOffset := LastLeftOffset;
|
||||
Marker.RightOffset := RightOffset;
|
||||
Result.Add(Marker);
|
||||
|
||||
Reference in New Issue
Block a user