aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexLua.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexers/LexLua.cxx')
-rw-r--r--lexers/LexLua.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/lexers/LexLua.cxx b/lexers/LexLua.cxx
index 0bf4aeea2..9e48efcd9 100644
--- a/lexers/LexLua.cxx
+++ b/lexers/LexLua.cxx
@@ -202,7 +202,7 @@ static void ColouriseLuaDoc(
sc.ChangeState(SCE_LUA_WORD);
if (strcmp(s, "goto") == 0) { // goto <label> forward scan
sc.SetState(SCE_LUA_DEFAULT);
- while (IsASpaceOrTab(sc.ch))
+ while (IsASpaceOrTab(sc.ch) && !sc.atLineEnd)
sc.Forward();
if (setWordStart.Contains(sc.ch)) {
sc.SetState(SCE_LUA_LABEL);