Fixed DCopy of global functions namespace problem #1109

git-svn-id: svn://ultimatepp.org/upp/trunk@8514 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-06-06 11:51:09 +00:00
parent 960d8c978a
commit ed0c016c2e

View file

@ -51,9 +51,12 @@ void AssistEditor::DCopy()
int best = 0;
const Index<String>& ns = CodeBase().namespaces;
for(int i = 0; i < ns.GetCount(); i++) {
String h = ns[i] + "::";
if(h.GetCount() > best && cls.StartsWith(h))
best = h.GetCount();
String h = ns[i];
for(int pass = 0; pass < 2; pass++) {
if(h.GetCount() > best && cls.StartsWith(h))
best = h.GetCount();
h << "::";
}
}
cls.Remove(0, best);
CppBase cpp;