From cd7d1f2bfe3aefbc85e657a6bbddeac39730612a Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Mon, 30 Jan 2012 23:58:30 +0530 Subject: [PATCH] Fix to not show thread debugging warning when entering characters like "~%". expand_string2() now uses it's own parser instead of principal_parser. Added PARSER_TYPE_ERRORS_ONLY in parser_type_t. --- expand.cpp | 18 +++++++++--------- highlight.cpp | 2 +- parser.h | 3 ++- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/expand.cpp b/expand.cpp index 4e1c748dc..e31133474 100644 --- a/expand.cpp +++ b/expand.cpp @@ -1277,7 +1277,7 @@ static int expand_variables2( parser_t &parser, wchar_t * in, std::vector al_get_count( &var_item_list ) ) { - parser_t::principal_parser().error( SYNTAX_ERROR, + parser.error( SYNTAX_ERROR, -1, ARRAY_BOUNDS_ERR ); is_ok=0; @@ -1374,7 +1374,7 @@ static int expand_variables2( parser_t &parser, wchar_t * in, std::vector &output, int flags ) { - parser_t &parser = parser_t::principal_parser(); + parser_t parser(PARSER_TYPE_ERRORS_ONLY); std::vector list1, list2; std::vector *in, *out; diff --git a/highlight.cpp b/highlight.cpp index de20fde33..3945dc2a2 100644 --- a/highlight.cpp +++ b/highlight.cpp @@ -175,7 +175,7 @@ int highlight_get_color( int highlight ) size_t i; int idx=0; int result = 0; - + if( highlight < 0 ) return FISH_COLOR_NORMAL; if( highlight >= (1<