diff options
| -rw-r--r-- | doc/ScintillaHistory.html | 3 | ||||
| -rw-r--r-- | lexers/LexVHDL.cxx | 7 | 
2 files changed, 7 insertions, 3 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index d3d270ce9..c7e5fbed8 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -502,6 +502,9 @@  	Verilog folder fixes a bug with inconsistent folding when fold.comment is on.  	</li>  	<li> +	VHDL folder fixes hang in folding when document starts with "entity". +	</li> +	<li>  	Add new indicators INDIC_COMPOSITIONTHIN and INDIC_FULLBOX.  	INDIC_COMPOSITIONTHIN is a thin underline that mimics the appearance of non-target segments in OS X IME.  	INDIC_FULLBOX is similar to INDIC_STRAIGHTBOX but covers the entire character area which means that diff --git a/lexers/LexVHDL.cxx b/lexers/LexVHDL.cxx index fe1b33317..474726c8f 100644 --- a/lexers/LexVHDL.cxx +++ b/lexers/LexVHDL.cxx @@ -388,13 +388,14 @@ static void FoldNoBoxVHDLDoc(              strcmp(s, "entity") == 0         ||              strcmp(s, "configuration") == 0 )            { -            if (strcmp(prevWord, "end") != 0) +            if (strcmp(prevWord, "end") != 0 && lastStart)              { // check for instantiated unit by backward searching for the colon. -              unsigned pos = lastStart-1; +              unsigned pos = lastStart;                char chAtPos, styleAtPos;                do{// skip white spaces +                pos--;                  styleAtPos = styler.StyleAt(pos); -                chAtPos = styler.SafeGetCharAt(pos--); +                chAtPos = styler.SafeGetCharAt(pos);                }while(pos>0 &&                       (chAtPos == ' ' || chAtPos == '\t' ||                        chAtPos == '\n' || chAtPos == '\r' || | 
