- fix: header completion error when header name contains '+'

This commit is contained in:
royqh1979@gmail.com 2022-02-22 15:38:40 +08:00
parent b664094efc
commit 18c9f62787
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,7 @@ Red Panda C++ Version 0.14.4
- enhancement: git - log
- fix: error in templates
- enhancement: git - reset
- fix: header completion error when header name contains '+'
Red Panda C++ Version 0.14.3
- fix: wrong code completion font size, when screen dpi changed

View File

@ -2934,11 +2934,11 @@ void Editor::headerCompletionInsert()
int posEnd = p.Char-1;
QString sLine = lineText();
while ((posBegin>0) &&
(isIdentChar(sLine[posBegin-1]) || (sLine[posBegin-1]=='.')))
(isIdentChar(sLine[posBegin-1]) || (sLine[posBegin-1]=='.') || (sLine[posBegin-1]=='+')))
posBegin--;
while ((posEnd < sLine.length())
&& (isIdentChar(sLine[posEnd]) || (sLine[posEnd]=='.')))
&& (isIdentChar(sLine[posEnd]) || (sLine[posEnd]=='.') || (sLine[posBegin-1]=='+')))
posEnd++;
p.Char = posBegin+1;
setBlockBegin(p);