fix: dead loop when parsing function tips

This commit is contained in:
Roy Qu 2022-01-26 14:45:21 +08:00
parent a7557899d1
commit 5a82da83fb
1 changed files with 3 additions and 1 deletions

View File

@ -3373,8 +3373,10 @@ void Editor::updateFunctionTip()
bool hasPreviousWord=false; bool hasPreviousWord=false;
while (x>=0) { while (x>=0) {
QChar ch=line[x]; QChar ch=line[x];
if (ch == ' ' || ch == '\t') if (ch == ' ' || ch == '\t') {
x--;
continue; continue;
}
if (isIdentChar(ch)) { if (isIdentChar(ch)) {
hasPreviousWord = true; hasPreviousWord = true;
break; break;