Fix style not enabled if restyle requested on unstyled document.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@249 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
harrybharry 2008-06-23 16:04:35 +00:00
parent 5be9af9cc9
commit 1335a73d63

View File

@ -1014,10 +1014,10 @@ void ScintillaEditView::restoreCurrentPos()
scroll(0, lineToShow);
}
//! \brief this method activates the doc and the corresponding sub tab
//! \brief return the index of previeus current doc
void ScintillaEditView::restyleBuffer() {
int end = execute(SCI_GETENDSTYLED); //style up to the last styled byte.
if (end == 0)
return;
execute(SCI_CLEARDOCUMENTSTYLE);
execute(SCI_COLOURISE, 0, end);
_currentBuffer->setNeedsLexing(false);