aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2009-03-02 12:13:11 +0000
committernyamatongwe <unknown>2009-03-02 12:13:11 +0000
commit04c1a853872e6ca664e9720da7cb4180c023184e (patch)
tree66de1441fdba551e26fd6e3c7c5988a4f464c08a /src
parentbec2a01c474e70f13576dc77cc703115bef87dc3 (diff)
downloadscintilla-mirror-04c1a853872e6ca664e9720da7cb4180c023184e.tar.gz
Bug #2635257 Shell HERE (redirect stdin) end not detected in Bash Lexer
fixed.
Diffstat (limited to 'src')
-rw-r--r--src/LexBash.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/LexBash.cxx b/src/LexBash.cxx
index 7b475a7de..5801278be 100644
--- a/src/LexBash.cxx
+++ b/src/LexBash.cxx
@@ -334,6 +334,10 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle,
}
char s[HERE_DELIM_MAX];
sc.GetCurrent(s, sizeof(s));
+ if (sc.LengthCurrent() == 0)
+ break;
+ if (s[strlen(s) - 1] == '\r')
+ s[strlen(s) - 1] = '\0';
if (strcmp(HereDoc.Delimiter, s) == 0) {
if ((prefixws > 0 && HereDoc.Indent) || // indentation rule
(prefixws == 0 && !HereDoc.Indent)) {