From 6aebeca1d0ff0e7a4a394247637e4475d16c672c Mon Sep 17 00:00:00 2001 From: Konrad Borowski Date: Sat, 27 Jul 2013 12:45:48 +0200 Subject: [PATCH] Highlight incorrect use of command or exec --- highlight.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/highlight.cpp b/highlight.cpp index 606604386..fd5ffb790 100644 --- a/highlight.cpp +++ b/highlight.cpp @@ -1035,7 +1035,7 @@ static void tokenize(const wchar_t * const buff, std::vector &color, const bool is_cmd = false; int is_subcommand = 0; int mark = tok_get_pos(&tok); - color.at(tok_get_pos(&tok)) = HIGHLIGHT_COMMAND; + color.at(tok_get_pos(&tok)) = use_builtin ? HIGHLIGHT_COMMAND : HIGHLIGHT_ERROR; if (parser_keywords_is_subcommand(cmd)) { @@ -1048,7 +1048,7 @@ static void tokenize(const wchar_t * const buff, std::vector &color, const use_command = 0; use_builtin = 1; } - else if (cmd == L"command") + else if (cmd == L"command" || cmd == L"exec") { use_command = 1; use_function = 0;