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;
while (x>=0) {
QChar ch=line[x];
if (ch == ' ' || ch == '\t')
if (ch == ' ' || ch == '\t') {
x--;
continue;
}
if (isIdentChar(ch)) {
hasPreviousWord = true;
break;