From 5ddaecbf5288bc7ecb551627ab11083264a63b31 Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Thu, 10 Jul 2014 13:06:30 -0400 Subject: [PATCH] friendlyparser: go back upto 2 words looking for match --- src/parser/antlr_input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/antlr_input.cpp b/src/parser/antlr_input.cpp index d72b311cb..aa431ef42 100644 --- a/src/parser/antlr_input.cpp +++ b/src/parser/antlr_input.cpp @@ -402,7 +402,7 @@ std::string parseErrorHelper(const char* lineStart, int charPositionInLine, cons } else { bool foundCaretPos = false; - for(int tries = 0; tries < 1 && caretPos > 0 && !foundCaretPos; ++tries) { + for(int tries = 0; tries < 2 && caretPos > 0 && !foundCaretPos; ++tries) { // go to nearest alphanumeric string (before current position), // see if that word can be found in original message. If so, // point to that, else keep pointer where it was. -- 2.30.2