mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 15:24:35 +02:00
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:
parent
5be9af9cc9
commit
1335a73d63
@ -1014,10 +1014,10 @@ void ScintillaEditView::restoreCurrentPos()
|
|||||||
scroll(0, lineToShow);
|
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() {
|
void ScintillaEditView::restyleBuffer() {
|
||||||
int end = execute(SCI_GETENDSTYLED); //style up to the last styled byte.
|
int end = execute(SCI_GETENDSTYLED); //style up to the last styled byte.
|
||||||
|
if (end == 0)
|
||||||
|
return;
|
||||||
execute(SCI_CLEARDOCUMENTSTYLE);
|
execute(SCI_CLEARDOCUMENTSTYLE);
|
||||||
execute(SCI_COLOURISE, 0, end);
|
execute(SCI_COLOURISE, 0, end);
|
||||||
_currentBuffer->setNeedsLexing(false);
|
_currentBuffer->setNeedsLexing(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user