- fix: shouldn't auto add '()' when char succeeding the completed function name is '('

This commit is contained in:
royqh1979@gmail.com 2021-11-10 12:35:13 +08:00
parent 4e7269cbf0
commit ad7fb23117
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 0.8.4 For Dev-C++ 7 Beta Version 0.8.4 For Dev-C++ 7 Beta
- enhancement: auto save/load the default open folder in the configuration file - enhancement: auto save/load the default open folder in the configuration file
- fix: shouldn't auto add '()' when char succeeding the completed function name is '('
Version 0.8.3 For Dev-C++ 7 Beta Version 0.8.3 For Dev-C++ 7 Beta
- enhancement: View menu - enhancement: View menu

View File

@ -2462,7 +2462,7 @@ void Editor::completionInsert(bool appendFunc)
|| statement->kind == StatementKind::skConstructor || statement->kind == StatementKind::skConstructor
|| statement->kind == StatementKind::skDestructor) { || statement->kind == StatementKind::skDestructor) {
if ((p.Char >= lineText().length()) // it's the last char on line if ((p.Char >= lineText().length()) // it's the last char on line
|| (lineText().at(p.Char) != '(')) { // it don't have '(' after it || (lineText().at(p.Char-1) != '(')) { // it don't have '(' after it
if (statement->fullName!="std::endl") if (statement->fullName!="std::endl")
funcAddOn = "()"; funcAddOn = "()";
} }