- fix: typo error in the parser

- fix: typing after symbols like 'std::string' shouldn't show code completion suggestions
This commit is contained in:
Roy Qu 2022-02-07 09:53:02 +08:00
parent 3831c72558
commit 6cbab4a646
3 changed files with 4 additions and 2 deletions

View File

@ -15,6 +15,8 @@ Red Panda C++ Version 0.14.1
- fix: actions not correctly disabled when compile
- fix: can't differentiate disabled and enabled buttons, when using contrast icon set
- fix: when running problem cases, the output textbox might be wrongly cleared.
- fix: typo error in the parser
- fix: typing after symbols like 'std::string' shouldn't show code completion suggestions
Red Panda C++ Version 0.14.0
- enhancement: custom icon set ( in the configuration folder)

View File

@ -3933,7 +3933,7 @@ QString Editor::getPreviousWordAtPositionForSuggestion(const BufferCoord &p)
return "";
wordBegin = wordEnd;
while ((wordBegin >= 0) && isIdentChar(s[wordBegin])) {
while ((wordBegin >= 0) && (isIdentChar(s[wordBegin]) || s[wordBegin]==':') ) {
wordBegin--;
}
wordBegin++;

View File

@ -1549,7 +1549,7 @@ bool CppParser::checkForStructs()
int keyLen = calcKeyLenForStruct(word);
if (keyLen<0)
return false;
bool result = (word.length() == keyLen) || isSpaceChar(word[keyLen] == ' ')
bool result = (word.length() == keyLen) || isSpaceChar(word[keyLen])
|| (word[keyLen] == '[');
if (result) {