From ea03b8aa2d524ab3503d5125e94d5f99a7154477 Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 25 Jul 2009 15:19:03 +0000 Subject: [PATCH] SynEdit,SyncroEdit: Fixed CPU usage 9editor redraw) while inactive. Issue #14191 git-svn-id: trunk@20945 - --- components/synedit/synpluginsyncroedit.pp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/synedit/synpluginsyncroedit.pp b/components/synedit/synpluginsyncroedit.pp index f2365bb5e3..2074a93144 100644 --- a/components/synedit/synpluginsyncroedit.pp +++ b/components/synedit/synpluginsyncroedit.pp @@ -709,6 +709,7 @@ end; procedure TSynPluginSyncroEditMarkup.DoInvalidate; begin + if not Enabled then exit; // TODO: GutterPaint does not trigger Markup modules TSynEdit(SynEdit).Invalidate; //if TSynEdit(SynEdit).GutterWidth < FGutterGlyph.Width then @@ -1017,9 +1018,11 @@ begin If (not SelectionObj.SelAvail) or (SelectionObj.ActiveSelectionMode = smColumn) then begin FLastSelStart := Point(-1,-1); FLastSelEnd := Point(-1,-1); - FWordIndex.Clear; - if Active then Editor.Invalidate; - Active := False; + if Active then begin + FWordIndex.Clear; + Editor.Invalidate; + Active := False; + end; FMode := spseIncative; exit; end;