From 7e080a46bb333634fed435d7c88447b6bcaaa998 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Thu, 20 Oct 2022 16:19:49 +0200 Subject: [PATCH] Fix brace match not working in Large File Restriction Fix also the highlight remaining issue while Large File Restriction disabled. --- PowerEditor/src/NppNotification.cpp | 2 +- PowerEditor/src/WinControls/Preference/preferenceDlg.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index 6e5140a02..20eda1091 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -902,7 +902,7 @@ BOOL Notepad_plus::notify(SCNotification *notification) xmlTagMatchHiliter.tagMatch(nppGui._enableTagAttrsHilite); } - if (nppGui._enableSmartHilite && !currentBuf->allowSmartHilite()) + if (nppGui._enableSmartHilite && currentBuf->allowSmartHilite()) { if (nppGui._disableSmartHiliteTmp) nppGui._disableSmartHiliteTmp = false; diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index b4abd5d05..7192dde39 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -5014,6 +5014,12 @@ intptr_t CALLBACK PerformanceSubDlg::run_dlgProc(UINT message , WPARAM wParam, L ::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_PERFORMANCE_DEACTIVATEWORDWRAP), largeFileRestrictionEnabled); redraw(); + + if (largeFileRestrictionEnabled) + { + ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_CLEANSMARTHILITING, 0, 0); + ::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_CLEANBRACEMATCH, 0, 0); + } } return TRUE;