mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:50:20 +08:00
Restrict HTML formatter for SQL INSERT/REPLACE output in grid export dialog to 100kb, as SynEdit is just too slow when exporting larger strings. Fixes issue #2903.
This commit is contained in:
@ -689,6 +689,8 @@ begin
|
|||||||
S.WriteString(tmp);
|
S.WriteString(tmp);
|
||||||
|
|
||||||
if radioOutputCopyToClipboard.Checked then begin
|
if radioOutputCopyToClipboard.Checked then begin
|
||||||
|
// SynEdit's exporter is slow on large strings, see issue #2903
|
||||||
|
if S.Size < 100*SIZE_KB then begin
|
||||||
case ExportFormat of
|
case ExportFormat of
|
||||||
efSQLInsert, efSQLReplace: begin
|
efSQLInsert, efSQLReplace: begin
|
||||||
Exporter := TSynExporterHTML.Create(Self);
|
Exporter := TSynExporterHTML.Create(Self);
|
||||||
@ -701,6 +703,7 @@ begin
|
|||||||
efHTML: HTML := S;
|
efHTML: HTML := S;
|
||||||
else HTML := nil;
|
else HTML := nil;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
StreamToClipboard(S, HTML, (ExportFormat=efHTML) and (HTML <> nil));
|
StreamToClipboard(S, HTML, (ExportFormat=efHTML) and (HTML <> nil));
|
||||||
end else begin
|
end else begin
|
||||||
try
|
try
|
||||||
|
Reference in New Issue
Block a user