Fix issue with wrong smart highlighting when it is disabled

Fixes #4774, close #4893
This commit is contained in:
Pavel Nedev 2018-10-03 11:41:40 +03:00 committed by Don HO
parent 55394cfb08
commit 456ff70554

View File

@ -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())