aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexLua.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2011-08-05 12:18:14 +1000
committernyamatongwe <unknown>2011-08-05 12:18:14 +1000
commitcec33e5615116147330dce0c6109f34db93c01b1 (patch)
tree42dc1beade3a1c41952ecf7ce35bdf1291e6599a /lexers/LexLua.cxx
parent0f6df3f52a8b10105b209936151fe30f6c03628b (diff)
downloadscintilla-mirror-cec33e5615116147330dce0c6109f34db93c01b1.tar.gz
Fix for infinite loop bug when typing "goto " at the end of the program.
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);