aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--doc/ScintillaHistory.html5
-rw-r--r--lexers/LexLua.cxx4
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 39afda215..80d7c8e73 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -525,6 +525,11 @@
Released 30 December 2016.
</li>
<li>
+ The Lua lexer requires the first line to start with "#!" to be treated as a shebang comment,
+ not just "#".
+ <a href="http://sourceforge.net/p/scintilla/bugs/1900/">Bug #1900</a>.
+ </li>
+ <li>
The Python lexer partly supports f-strings, allows Unicode identifiers, and no longer allows @1 to be a decorator.
<a href="http://sourceforge.net/p/scintilla/bugs/1848/">Bug #1848</a>.
</li>
diff --git a/lexers/LexLua.cxx b/lexers/LexLua.cxx
index 1e115ad18..1086b40e8 100644
--- a/lexers/LexLua.cxx
+++ b/lexers/LexLua.cxx
@@ -89,8 +89,8 @@ static void ColouriseLuaDoc(
}
StyleContext sc(startPos, length, initStyle, styler);
- if (startPos == 0 && sc.ch == '#') {
- // shbang line: # is a comment only if first char of the script
+ if (startPos == 0 && sc.ch == '#' && sc.chNext == '!') {
+ // shbang line: "#!" is a comment only if located at the start of the script
sc.SetState(SCE_LUA_COMMENTLINE);
}
for (; sc.More(); sc.Forward()) {