[BUG_FIXED] (Author: visimulator) Prevent Notepad++ from crash while scrolling pass over EOF.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1183 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2014-02-20 18:19:57 +00:00
parent c18eccdd37
commit 7ce969dc74

View File

@ -1734,6 +1734,7 @@ void ScintillaEditView::getVisibleStartAndEndPosition(int * startPos, int * endP
int linesOnScreen = execute(SCI_LINESONSCREEN);
int lineCount = execute(SCI_GETLINECOUNT);
*endPos = execute(SCI_POSITIONFROMLINE, execute(SCI_DOCLINEFROMVISIBLE, firstVisibleLine + min(linesOnScreen, lineCount)));
if (*endPos == -1) *endPos = execute(SCI_GETLENGTH);
}
char * ScintillaEditView::getWordFromRange(char * txt, int size, int pos1, int pos2)