diff --git a/NEWS.md b/NEWS.md index 15812dbc..f727d225 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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) diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 74934e2a..638614bd 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -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++; diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 6f7a7042..3199cf12 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -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) {