Skip to content

Commit

Permalink
Fixes editor freeze
Browse files Browse the repository at this point in the history
  • Loading branch information
crr0004 committed Sep 2, 2015
1 parent 688047a commit f34c3e2
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 f34c3e2

Please sign in to comment.