Skip to content

Commit

Permalink
Merge pull request #2414 from crr0004/2409-editor-freeze
Browse files Browse the repository at this point in the history
Issue #2409 Fixes editor freeze
  • Loading branch information
reduz committed Sep 2, 2015
2 parents 688047a + f34c3e2 commit 7900d5d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/gdscript/gd_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7900d5d

Please sign in to comment.