|
|
@ -2803,88 +2803,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
case SCN_UPDATEUI:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NppParameters *nppParam = NppParameters::getInstance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if it's searching/replacing, then do nothing
|
|
|
|
|
|
|
|
if (nppParam->_isFindReplacing)
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (notification->nmhdr.hwndFrom != _pEditView->getHSelf())
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static NppGUI & nppGui = (NppGUI &)nppParam->getNppGUI();
|
|
|
|
|
|
|
|
static StyleArray & stylers = nppParam->getMiscStylerArray();
|
|
|
|
|
|
|
|
static int iBraceStyle = stylers.getStylerIndexByID(STYLE_BRACELIGHT);
|
|
|
|
|
|
|
|
if (iBraceStyle != -1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Style *pBraceStyle = &(stylers.getStyler(iBraceStyle));
|
|
|
|
|
|
|
|
_pEditView->execute(SCI_STYLESETFORE, STYLE_BRACELIGHT, pBraceStyle->_fgColor);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (braceMatch())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_pEditView->clearIndicator(SCE_UNIVERSAL_TAGMATCH);
|
|
|
|
|
|
|
|
_pEditView->clearIndicator(SCE_UNIVERSAL_TAGATTR);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (nppGui._enableTagsMatchHilite)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
XmlMatchedTagsHighlighter xmlTagMatchHiliter(_pEditView);
|
|
|
|
|
|
|
|
pair<int, int> tagPos = xmlTagMatchHiliter.tagMatch(nppGui._enableTagAttrsHilite);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int braceAtCaret = tagPos.first;
|
|
|
|
|
|
|
|
int braceOpposite = tagPos.second;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ((braceAtCaret != -1) && (braceOpposite == -1))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_pEditView->execute(SCI_SETHIGHLIGHTGUIDE, 0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else if (_pEditView->isShownIndentGuide())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int columnAtCaret = int(_pEditView->execute(SCI_GETCOLUMN, braceAtCaret));
|
|
|
|
|
|
|
|
int columnOpposite = int(_pEditView->execute(SCI_GETCOLUMN, braceOpposite));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int lineAtCaret = int(_pEditView->execute(SCI_LINEFROMPOSITION, braceAtCaret));
|
|
|
|
|
|
|
|
int lineOpposite = int(_pEditView->execute(SCI_LINEFROMPOSITION, braceOpposite));
|
|
|
|
|
|
|
|
if (lineAtCaret != lineOpposite)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
static int iTagMatchStyle = stylers.getStylerIndexByID(SCE_UNIVERSAL_TAGMATCH);
|
|
|
|
|
|
|
|
if (iTagMatchStyle != -1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Style *pTagStyle = &(stylers.getStyler(iTagMatchStyle));
|
|
|
|
|
|
|
|
_pEditView->execute(SCI_STYLESETFORE, STYLE_BRACELIGHT, pTagStyle->_bgColor);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// braceAtCaret - 1, braceOpposite-1 : walk around to not highlight the '<'
|
|
|
|
|
|
|
|
_pEditView->execute(SCI_BRACEHIGHLIGHT, braceAtCaret-1, braceOpposite-1);
|
|
|
|
|
|
|
|
_pEditView->execute(SCI_SETHIGHLIGHTGUIDE, (columnAtCaret < columnOpposite)?columnAtCaret:columnOpposite);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (nppGui._enableSmartHilite)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (nppGui._disableSmartHiliteTmp)
|
|
|
|
|
|
|
|
nppGui._disableSmartHiliteTmp = false;
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
_smartHighlighter.highlightView(notifyView);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
updateStatusBar();
|
|
|
|
|
|
|
|
AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub;
|
|
|
|
|
|
|
|
autoC->update(0);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case SCN_SCROLLED:
|
|
|
|
case SCN_SCROLLED:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const NppGUI & nppGUI = (NppParameters::getInstance())->getNppGUI();
|
|
|
|
const NppGUI & nppGUI = (NppParameters::getInstance())->getNppGUI();
|
|
|
|