From 79158efaf5a2b90466ecbd786e7a00facff7740a Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 7 Jul 2020 13:36:41 +0000 Subject: [PATCH] ide: Fixed minor issue in Assist git-svn-id: svn://ultimatepp.org/upp/trunk@14665 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Assist.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/uppsrc/ide/Assist.cpp b/uppsrc/ide/Assist.cpp index 6b2dac465..e735439f1 100644 --- a/uppsrc/ide/Assist.cpp +++ b/uppsrc/ide/Assist.cpp @@ -726,11 +726,12 @@ void AssistEditor::AssistInsert() Assist(); IgnoreMouseUp(); return; - } else { - String pkg = include_path.Left(include_path.GetCount()-1); + } + else { + String pkg = include_path.Left(include_path.GetCount() - 1); Vector nests = SplitDirs(GetVar("UPP")); for(int i = 0; i < nests.GetCount(); i++){ - if(FileExists(nests[i]+"/"+include_path+GetFileName(pkg)+".upp")) { + if(FileExists(nests[i] + "/" + include_path + GetFileName(pkg) + ".upp")) { Ide *ide = dynamic_cast(TheIde()); if(ide) ide->AddPackage(pkg); @@ -771,8 +772,7 @@ void AssistEditor::AssistInsert() if(!thisback && f.kind >= FUNCTION && f.kind <= INLINEFRIEND) { SetCursor(GetCursor32() - 1); StartParamInfo(f, cl); - int x = f.natural.ReverseFind('('); - if(x >= 0 && f.natural[x + 1] == ')') + if(f.natural.EndsWith("()")) SetCursor(GetCursor32() + 1); } else