diff options
author | Neil <nyamatongwe@gmail.com> | 2019-09-28 09:38:07 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-09-28 09:38:07 +1000 |
commit | dba67afa3d383e1a7447d8484968e4e6b0252f1e (patch) | |
tree | bc720051685a325a517939f550e3d4cb2d12e8a8 | |
parent | 4fb4f749d4beec089da677fe3d669f80f0e5db27 (diff) | |
download | scintilla-mirror-dba67afa3d383e1a7447d8484968e4e6b0252f1e.tar.gz |
Bug [#2129]. Fix crash with 'interface=none' comment.
-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) ; |