[UPDATE] (Author: Neomi) Remove unnecessary modification in Scintilla.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1106 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
9e0bf8b63a
commit
01f3148e0e
@ -596,7 +596,15 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
case SCN_UPDATEUI:
|
||||
{
|
||||
NppParameters *nppParam = NppParameters::getInstance();
|
||||
|
||||
|
||||
// replacement for obsolete custom SCN_SCROLLED
|
||||
if (notification->updated & SC_UPDATE_V_SCROLL)
|
||||
{
|
||||
int urlAction = (NppParameters::getInstance())->getNppGUI()._styleURL;
|
||||
if ((urlAction == 1) || (urlAction == 2))
|
||||
addHotSpot();
|
||||
}
|
||||
|
||||
// if it's searching/replacing, then do nothing
|
||||
if (nppParam->_isFindReplacing)
|
||||
break;
|
||||
@ -629,19 +637,6 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
break;
|
||||
}
|
||||
|
||||
case SCN_SCROLLED:
|
||||
{
|
||||
const NppGUI & nppGUI = (NppParameters::getInstance())->getNppGUI();
|
||||
if (nppGUI._enableSmartHilite)
|
||||
_smartHighlighter.highlightView(notifyView);
|
||||
|
||||
int urlAction = (NppParameters::getInstance())->getNppGUI()._styleURL;
|
||||
if ((urlAction == 1) || (urlAction == 2))
|
||||
addHotSpot();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case TTN_GETDISPINFO:
|
||||
{
|
||||
try {
|
||||
|
@ -89,11 +89,8 @@ void SmartHighlighter::highlightView(ScintillaEditView * pHighlightView)
|
||||
int firstLine = (int)pHighlightView->execute(SCI_GETFIRSTVISIBLELINE);
|
||||
int nrLines = min((int)pHighlightView->execute(SCI_LINESONSCREEN), MAXLINEHIGHLIGHT ) + 1;
|
||||
int lastLine = firstLine+nrLines;
|
||||
int startPos = 0;//(int)pHighlightView->execute(SCI_POSITIONFROMLINE, firstLine);
|
||||
int endPos = 0;//(int)pHighlightView->execute(SCI_POSITIONFROMLINE, lastLine);
|
||||
//if (endPos == -1) { //past EOF
|
||||
// endPos = (int)pHighlightView->getCurrentDocLen() - 1;
|
||||
//}
|
||||
int startPos = 0;
|
||||
int endPos = 0;
|
||||
int currentLine = firstLine;
|
||||
int prevDocLineChecked = -1; //invalid start
|
||||
|
||||
@ -104,14 +101,11 @@ void SmartHighlighter::highlightView(ScintillaEditView * pHighlightView)
|
||||
fo._isWholeWord = true;
|
||||
|
||||
const TCHAR * searchText = NULL;
|
||||
#ifdef UNICODE
|
||||
|
||||
WcharMbcsConvertor *wmc = WcharMbcsConvertor::getInstance();
|
||||
unsigned int cp = pHighlightView->execute(SCI_GETCODEPAGE);
|
||||
const TCHAR * text2FindW = wmc->char2wchar(text2Find, cp);
|
||||
searchText = text2FindW;
|
||||
#else
|
||||
searchText = text2Find;
|
||||
#endif
|
||||
|
||||
for(; currentLine < lastLine; ++currentLine)
|
||||
{
|
||||
|
@ -1047,7 +1047,6 @@ void Editor::ScrollTo(int line, bool moveThumb) {
|
||||
if (moveThumb) {
|
||||
SetVerticalScrollPos();
|
||||
}
|
||||
NotifyScrolled();
|
||||
}
|
||||
}
|
||||
|
||||
@ -4520,12 +4519,6 @@ void Editor::NotifyPainted() {
|
||||
NotifyParent(scn);
|
||||
}
|
||||
|
||||
void Editor::NotifyScrolled() {
|
||||
SCNotification scn = {0};
|
||||
scn.nmhdr.code = SCN_SCROLLED;
|
||||
NotifyParent(scn);
|
||||
}
|
||||
|
||||
void Editor::NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt) {
|
||||
int mask = pdoc->decorations.AllOnFor(position);
|
||||
if ((click && mask) || pdoc->decorations.clickNotified) {
|
||||
|
Loading…
Reference in New Issue
Block a user