From 6ab8ba9869eb257bd2854468b21cf757216ba9df Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 19 Dec 2021 16:54:31 +0800 Subject: [PATCH] - fix: compiler set's custom link parameters not used when compiling - fix: code completion doesn't work when input inside () or [] --- NEWS.md | 4 ++++ RedPandaIDE/compiler/compiler.cpp | 2 +- RedPandaIDE/editor.cpp | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 7dab8936..62d1743f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +Version 0.11.4 For Dev-C++ 7 Beta + - fix: compiler set's custom link parameters not used when compiling + - fix: + Version 0.11.3 For Dev-C++ 7 Beta - fix: use pixel size for fonts, to fit different dpi in multiple displays - enhancement: use the new expression parser to parse info for tips diff --git a/RedPandaIDE/compiler/compiler.cpp b/RedPandaIDE/compiler/compiler.cpp index 3954ed4f..9f1f26d1 100644 --- a/RedPandaIDE/compiler/compiler.cpp +++ b/RedPandaIDE/compiler/compiler.cpp @@ -475,7 +475,7 @@ QString Compiler::getLibraryArguments(FileType fileType) // Add global compiler linker extras if (compilerSet()->useCustomLinkParams() && !compilerSet()->customLinkParams().isEmpty()) { - result += " "+compilerSet()->customCompileParams(); + result += " "+compilerSet()->customLinkParams(); } if (mProject) { diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index bbecb4ee..271eec69 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -2637,8 +2637,10 @@ void Editor::showCompletion(const QString& preWord,bool autoComplete) //word=getWordAtPosition(this,caretXY(),pBeginPos,pEndPos, WordPurpose::wpCompletion); QString memberOperator; QStringList memberExpression; + BufferCoord pos = caretXY(); + pos.Char--; QStringList ownerExpression = getOwnerExpressionAndMemberAtPositionForCompletion( - caretXY(), + pos, memberOperator, memberExpression); // qDebug()<