diff options
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | lexers/LexMetapost.cxx | 3 | 
2 files changed, 6 insertions, 1 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 9adbc9379..72ed06c0a 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -568,6 +568,10 @@  	SciTE enables use of SCI_ commands in user.context.menu.  	</li>   	<li> +	Metapost lexer fixes crash with 'interface=none' comment. +	<a href="https://sourceforge.net/p/scintilla/bugs/2129/">Bug #2129</a>. +	</li> + 	<li>  	Perl lexer supports indented here-docs.  	<a href="https://sourceforge.net/p/scintilla/bugs/2121/">Bug #2121</a>.  	</li> diff --git a/lexers/LexMetapost.cxx b/lexers/LexMetapost.cxx index 315a1eab0..7f4e69e59 100644 --- a/lexers/LexMetapost.cxx +++ b/lexers/LexMetapost.cxx @@ -177,7 +177,8 @@ static void ColouriseMETAPOSTDoc(  	}  	WordList &keywords  = *keywordlists[0] ; -	WordList &keywords2 = *keywordlists[extraInterface-1] ; +	WordList kwEmpty; +	WordList &keywords2 = (extraInterface > 0) ? *keywordlists[extraInterface - 1] : kwEmpty;  	StyleContext sc(startPos, length, SCE_METAPOST_TEXT, styler) ; | 
