diff options
| author | Vicente <unknown> | 2017-03-06 13:53:09 +1100 | 
|---|---|---|
| committer | Vicente <unknown> | 2017-03-06 13:53:09 +1100 | 
| commit | d38ff94eaa712ffc048b75764e394865ea31c2a8 (patch) | |
| tree | aa11e9eeca3c09e49fa2e6dc8dd497e6dcabc364 | |
| parent | 26fc47b6fc2445b1d9b4a20eb3ccc79cf2fca315 (diff) | |
| download | scintilla-mirror-d38ff94eaa712ffc048b75764e394865ea31c2a8.tar.gz | |
Fold a VHDL "entity" on the first line of the file.
| -rw-r--r-- | doc/ScintillaHistory.html | 3 | ||||
| -rw-r--r-- | lexers/LexVHDL.cxx | 8 | 
2 files changed, 8 insertions, 3 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 764d1eeb3..f8892ae03 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -527,6 +527,9 @@  	Released 19 February 2017.  	</li>  	<li> +	The VHDL folder folds an "entity" on the first line of the file. +	</li> +	<li>  	For IMEs, do not clear selected text when there is no composition text to show.  	</li>  	<li> diff --git a/lexers/LexVHDL.cxx b/lexers/LexVHDL.cxx index 5fa428bce..a1d75b277 100644 --- a/lexers/LexVHDL.cxx +++ b/lexers/LexVHDL.cxx @@ -398,15 +398,17 @@ static void FoldNoBoxVHDLDoc(              strcmp(s, "entity") == 0         ||              strcmp(s, "configuration") == 0 )            { -            if (strcmp(prevWord, "end") != 0 && lastStart) +            if (strcmp(prevWord, "end") != 0)              { // check for instantiated unit by backward searching for the colon.                Sci_PositionU pos = lastStart; -              char chAtPos, styleAtPos; +              char chAtPos=0, styleAtPos;                do{// skip white spaces +                if(!pos) +                  break;                  pos--;                  styleAtPos = styler.StyleAt(pos);                  chAtPos = styler.SafeGetCharAt(pos); -              }while(pos>0 && +              }while(pos &&                       (chAtPos == ' ' || chAtPos == '\t' ||                        chAtPos == '\n' || chAtPos == '\r' ||                        IsCommentStyle(styleAtPos))); | 
