mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 19:20:17 +08:00
Issue #1552: fix hanging due to querying TSynMemo.GetTextLen in OnPaintTransient
This commit is contained in:
@ -7395,9 +7395,10 @@ begin
|
|||||||
if (MatchingBraceBackgroundColor = clNone) and (MatchingBraceForegroundColor = clNone) then
|
if (MatchingBraceBackgroundColor = clNone) and (MatchingBraceForegroundColor = clNone) then
|
||||||
Exit;
|
Exit;
|
||||||
Editor := TSynEdit(Sender);
|
Editor := TSynEdit(Sender);
|
||||||
// Prevent lagging on large contents
|
// Check for Editor.GetTextLen causes some endless loop in SynEdit.
|
||||||
if Editor.GetTextLen > 5*SIZE_MB then
|
// But not due to activated WordWrap. Must be some interlocked WM_GETTEXTLENGTH message, or an undefined text length.
|
||||||
Exit;
|
//if Editor.GetTextLen > 5*SIZE_MB then
|
||||||
|
// Exit;
|
||||||
|
|
||||||
// Highlight matching words, if selected text is a (small) word
|
// Highlight matching words, if selected text is a (small) word
|
||||||
if Editor.SelLength < Editor.CharsInWindow then begin
|
if Editor.SelLength < Editor.CharsInWindow then begin
|
||||||
|
Reference in New Issue
Block a user