Bug #3402443 Syntax coloring and folding loosed on big xmls

This commit is contained in:
Zane U. Ji 2012-09-08 20:18:27 +08:00
parent f51059a54e
commit e42354ff09
1 changed files with 5 additions and 4 deletions

View File

@ -2017,14 +2017,15 @@ void XmlCtrl::clearErrorIndicators ( int maxLine )
if ( maxLine < 0 )
return;
int documentLength = GetLength();
if ( !documentLength )
int length = GetLength();
if ( !length )
return;
StartStyling ( 0, wxSTC_INDIC2_MASK );
int length;
length = ( maxLine ) ? GetLineEndPosition ( maxLine ) : documentLength;
int end = GetEndStyled();
length = ( maxLine ) ? GetLineEndPosition ( maxLine ) : length;
if ( length > end ) length = end;
SetStyling ( length, 0 );
}