ide: ContextGoto fixes #1198

git-svn-id: svn://ultimatepp.org/upp/trunk@8736 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-07-23 19:14:18 +00:00
parent 9fbcb6fc76
commit 653b421e41

View file

@ -206,6 +206,8 @@ void Ide::ContextGoto0(int pos)
else
break;
}
if(qual.GetCount() == 0)
qual = ":";
}
Vector<String> scope;
@ -234,9 +236,12 @@ void Ide::ContextGoto0(int pos)
Vector<String> ns = parser.GetNamespaces();
if(qual.GetCount() > 2 && qual.StartsWith("::"))
qual = qual.Mid(2);
if(qual.GetCount()) { // Ctrl::MOUSELEFT, Vector<String>::Iterator
Vector<String> todo;
String qa = Qualify(CodeBase(), parser.current_scope, qual + "::" + id, parser.context.namespace_using);
String qa = Qualify(CodeBase(), parser.current_scope, *qual == ':' ? id : qual + "::" + id,
parser.context.namespace_using);
qa = RemoveTemplateParams(qa);
if(CodeBase().Find(qa) < 0) { // Upp::FileTabs::RenameFile
int q = qa.ReverseFind("::");
@ -247,6 +252,10 @@ void Ide::ContextGoto0(int pos)
istype.Add(false);
}
}
else {
scope.Add(Null); // Add global namespace
istype.Add(false);
}
}
todo.Add(qa);
while(scope.GetCount() < 100 && todo.GetCount()) {