From 456ff7055402db3e64d2d5b2118c35314d42f72f Mon Sep 17 00:00:00 2001 From: Pavel Nedev Date: Wed, 3 Oct 2018 11:41:40 +0300 Subject: [PATCH] Fix issue with wrong smart highlighting when it is disabled Fixes #4774, close #4893 --- PowerEditor/src/ScitillaComponent/SmartHighlighter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/SmartHighlighter.cpp b/PowerEditor/src/ScitillaComponent/SmartHighlighter.cpp index 9ae9605e..d22d4d30 100644 --- a/PowerEditor/src/ScitillaComponent/SmartHighlighter.cpp +++ b/PowerEditor/src/ScitillaComponent/SmartHighlighter.cpp @@ -114,8 +114,8 @@ void SmartHighlighter::highlightView(ScintillaEditView * pHighlightView, Scintil const NppGUI & nppGUI = NppParameters::getInstance()->getNppGUI(); - // If nothing selected, dont mark anything - if (pHighlightView->execute(SCI_GETSELECTIONEMPTY) == 1) + // If nothing selected or smart highlighting disabled, don't mark anything + if ((!nppGUI._enableSmartHilite) || (pHighlightView->execute(SCI_GETSELECTIONEMPTY) == 1)) { if (nppGUI._smartHiliteOnAnotherView && unfocusView && unfocusView->isVisible() && unfocusView->getCurrentBufferID() != pHighlightView->getCurrentBufferID())