diff options
| -rw-r--r-- | doc/ScintillaHistory.html | 5 | ||||
| -rw-r--r-- | lexers/LexLaTeX.cxx | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 898eb6d4c..f572606af 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -547,6 +547,7 @@ <td>McLoo</td> </tr><tr> <td>Chris Graham</td> + <td>Hugues Larrive</td> </tr> </table> <p> @@ -591,6 +592,10 @@ <a href="https://sourceforge.net/p/scintilla/bugs/2019/">Bug #2019</a>. </li> <li> + The latex lexer supports lstlisting environment that is similar to verbatim. + <a href="https://sourceforge.net/p/scintilla/feature-requests/1358/">Feature #1358</a>. + </li> + <li> Fixed bug with GTK on recent Linux distributions where underscores were invisible. <a href="https://sourceforge.net/p/scintilla/bugs/2173/">Bug #2173</a>. </li> diff --git a/lexers/LexLaTeX.cxx b/lexers/LexLaTeX.cxx index 496d04177..4b6cbdc6e 100644 --- a/lexers/LexLaTeX.cxx +++ b/lexers/LexLaTeX.cxx @@ -305,6 +305,8 @@ void SCI_METHOD LexerLaTeX::Lex(Sci_PositionU startPos, Sci_Position length, int latexStateReset(mode, state); if (latexLastWordIs(i, styler, "{verbatim}")) { state = SCE_L_VERBATIM; + } else if (latexLastWordIs(i, styler, "{lstlisting}")) { + state = SCE_L_VERBATIM; } else if (latexLastWordIs(i, styler, "{comment}")) { state = SCE_L_COMMENT2; } else if (latexLastWordIs(i, styler, "{math}") && mode == 0) { @@ -453,6 +455,9 @@ void SCI_METHOD LexerLaTeX::Lex(Sci_PositionU startPos, Sci_Position length, int if (latexLastWordIs(match, styler, "{verbatim}")) { styler.ColourTo(i - 1, state); state = SCE_L_COMMAND; + } else if (latexLastWordIs(match, styler, "{lstlisting}")) { + styler.ColourTo(i - 1, state); + state = SCE_L_COMMAND; } } } |
