From d35759a648a783394b809bdff0810cc16ee39c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Wed, 1 Nov 2006 16:52:16 +0000 Subject: [PATCH] Fixed wrong detection of some words. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@958 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 1 + scintilla/LexBash.cxx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 41664cc0..d9de1532 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * src/search.c: Changed tooltip of checkbox "Close dialog" to be more descriptive. * src/keybindings.c: Changed keybinding for Print to Ctrl+C. + * scintilla/LexBash.cxx: Fixed wrong detection of some words. 2006-11-01 Nick Treleaven diff --git a/scintilla/LexBash.cxx b/scintilla/LexBash.cxx index e9c31d6b..242985a9 100644 --- a/scintilla/LexBash.cxx +++ b/scintilla/LexBash.cxx @@ -338,7 +338,8 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle, HereDoc.Indent = false; } else if (ch == '-' // file test operators && isSingleCharOp(chNext) - && !isalnum((chNext2 = styler.SafeGetCharAt(i+2)))) { + && !isalnum((chNext2 = styler.SafeGetCharAt(i+2))) + && isspace(chPrev)) { styler.ColourTo(i + 1, SCE_SH_WORD); state = SCE_SH_DEFAULT; i++;