diff --git a/uppsrc/ide/Assist.cpp b/uppsrc/ide/Assist.cpp index b20056137..51c493be5 100644 --- a/uppsrc/ide/Assist.cpp +++ b/uppsrc/ide/Assist.cpp @@ -315,10 +315,6 @@ void AssistEditor::SyncAssist() } } } -// if(!include_assist) { -// LTIMING("Sort assist"); -// assist.Sort(0, CppItemInfoOrder); -// } } bool AssistEditor::IncludeAssist() @@ -458,7 +454,7 @@ void AssistEditor::Assist() Index typeset = EvaluateExpressionType(parser, xp); for(int i = 0; i < typeset.GetCount(); i++) if(typeset[i].GetCount()) - GatherItems(typeset[i], xp.GetCount(), in_types, xp.GetCount() == 0); + GatherItems(typeset[i], true, in_types, false); } else { GatherItems(parser.current_scope, false, in_types, true); diff --git a/uppsrc/ide/Cpp.cpp b/uppsrc/ide/Cpp.cpp index e04932f8c..b08a12b7d 100644 --- a/uppsrc/ide/Cpp.cpp +++ b/uppsrc/ide/Cpp.cpp @@ -278,7 +278,7 @@ int CharFilterT(int c) void AssistEditor::AssistItemAdd(const String& scope, const CppItem& m, int typei) { - if(*m.name == '.' || m.name.GetCount() == 0) + if(!iscib(*m.name) || m.name.GetCount() == 0) return; CppItemInfo& f = assist_item.Add(m.name); f.typei = typei; @@ -299,7 +299,6 @@ void AssistEditor::GatherItems(const String& type, bool only_public, Index= 0) { if(types) { - LLOG("GatherItems types"); if(ntp.GetCount()) ntp << "::"; int typei = assist_type.FindAdd(""); @@ -326,7 +325,7 @@ void AssistEditor::GatherItems(const String& type, bool only_public, Index= 0) { @@ -368,7 +367,8 @@ void AssistEditor::RemoveDuplicates() i++; while(i < assist_item.GetCount() && assist_item[ii].typei == assist_item[i].typei - && assist_item[ii].qitem == assist_item[i].qitem) + && assist_item[ii].qitem == assist_item[i].qitem + && assist_item[ii].scope == assist_item[i].scope) remove.Add(i++); } assist_item.Remove(remove);