From ad7fb2311772843e3cd5f5b2de879385958f8a23 Mon Sep 17 00:00:00 2001 From: "royqh1979@gmail.com" Date: Wed, 10 Nov 2021 12:35:13 +0800 Subject: [PATCH] - fix: shouldn't auto add '()' when char succeeding the completed function name is '(' --- NEWS.md | 1 + RedPandaIDE/editor.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 4047f1dd..33530898 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ Version 0.8.4 For Dev-C++ 7 Beta - 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 - enhancement: View menu diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 794aa1fb..fb34914f 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -2462,7 +2462,7 @@ void Editor::completionInsert(bool appendFunc) || statement->kind == StatementKind::skConstructor || statement->kind == StatementKind::skDestructor) { 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") funcAddOn = "()"; }