Merge pull request #2414 from crr0004/2409-editor-freeze

Issue #2409 Fixes editor freeze
This commit is contained in:
Juan Linietsky 2015-09-02 07:55:17 -03:00
commit 7900d5daf2

View File

@ -1422,11 +1422,15 @@ bool GDParser::_recover_from_completion() {
return false; //can't recover if no completion
}
//skip stuff until newline
while(tokenizer->get_token()!=GDTokenizer::TK_NEWLINE && tokenizer->get_token()!=GDTokenizer::TK_EOF) {
while(tokenizer->get_token()!=GDTokenizer::TK_NEWLINE && tokenizer->get_token()!=GDTokenizer::TK_EOF && tokenizer->get_token()!=GDTokenizer::TK_ERROR) {
tokenizer->advance();
}
completion_found=false;
error_set=false;
if(tokenizer->get_token() == GDTokenizer::TK_ERROR){
error_set = true;
}
return true;
}