From 8d4289a18dbd62752a46ab667b5dfc1de252ec6e Mon Sep 17 00:00:00 2001 From: donho Date: Mon, 29 Sep 2008 20:50:12 +0000 Subject: [PATCH] [BUG_FIXED] Fix cpu high consummation bug while document is cloned with smart highlighting and xml matched highlighting features activating. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@331 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 816b9860..858956a7 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -2361,15 +2361,20 @@ BOOL Notepad_plus::notify(SCNotification *notification) case SCN_UPDATEUI: { + if (notification->nmhdr.hwndFrom != _pEditView->getHSelf()) + break; + braceMatch(); const NppGUI & nppGUI = (NppParameters::getInstance())->getNppGUI(); - if (nppGUI._enableTagsMatchHilite) + if (nppGUI._enableTagsMatchHilite/* && _pEditView->getHSelf() == notification->nmhdr.hwndFrom*/) { XmlMatchedTagsHighlighter xmlTagMatchHiliter(_pEditView); xmlTagMatchHiliter.tagMatch(nppGUI._enableTagAttrsHilite); } + _smartHighlighter.highlightView(notifyView); + updateStatusBar(); AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub; autoC->update(0);