diff options
author | nyamatongwe <unknown> | 2011-05-09 09:54:03 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-05-09 09:54:03 +1000 |
commit | 45daee5101a2f2b87856868972ef8db0994a84a4 (patch) | |
tree | bc2cf2143d901b705ee8f1b7aeca47956a996aa3 | |
parent | c9209d18f432741eca0bfe33ee81b8b7dc05959e (diff) | |
download | scintilla-mirror-45daee5101a2f2b87856868972ef8db0994a84a4.tar.gz |
Allow nested variables in make files. Bug #3298223.
From Dimitar Zhekov.
-rw-r--r-- | doc/ScintillaHistory.html | 1 | ||||
-rw-r--r-- | lexers/LexOthers.cxx | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index b961e30a3..08ecbc1fd 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -368,6 +368,7 @@ </tr><tr> <td>Dariusz KnociĊski</td> <td>Ben Fisher</td> + <td>Dimitar Zhekov</td> </tr> </table> <p> diff --git a/lexers/LexOthers.cxx b/lexers/LexOthers.cxx index 2062b1b18..7d0f099bb 100644 --- a/lexers/LexOthers.cxx +++ b/lexers/LexOthers.cxx @@ -854,13 +854,17 @@ static void ColouriseMakeLine( styler.ColourTo(endPos, SCE_MAKE_PREPROCESSOR); return; } + int varCount = 0; while (i < lengthLine) { if (lineBuffer[i] == '$' && lineBuffer[i + 1] == '(') { styler.ColourTo(startLine + i - 1, state); state = SCE_MAKE_IDENTIFIER; + varCount++; } else if (state == SCE_MAKE_IDENTIFIER && lineBuffer[i] == ')') { - styler.ColourTo(startLine + i, state); - state = SCE_MAKE_DEFAULT; + if (--varCount == 0) { + styler.ColourTo(startLine + i, state); + state = SCE_MAKE_DEFAULT; + } } // skip identifier and target styling if this is a command line |