mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
ide: Navigator ':' handling improved
git-svn-id: svn://ultimatepp.org/upp/trunk@7585 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f2b2e58f18
commit
89831648c9
1 changed files with 16 additions and 7 deletions
|
|
@ -188,13 +188,22 @@ void AssistEditor::Search()
|
|||
{
|
||||
list.Clear();
|
||||
item.Clear();
|
||||
String s = ~search;
|
||||
Vector<String> h = Split((String)~search, ':');
|
||||
String s = TrimBoth(~search);
|
||||
String search_name, search_nest;
|
||||
if(h.GetCount())
|
||||
search_name = h.Pop();
|
||||
if(h.GetCount())
|
||||
search_nest = Join(h, "::");
|
||||
bool wholeclass = false;
|
||||
if(s.Find(':') >= 0) {
|
||||
Vector<String> h = Split((String)~search, ':');
|
||||
if(*s.Last() == ':')
|
||||
search_nest = Join(h, "::");
|
||||
else {
|
||||
search_name = h.Pop();
|
||||
if(h.GetCount())
|
||||
search_nest = Join(h, "::");
|
||||
}
|
||||
wholeclass = *s == ':';
|
||||
}
|
||||
else
|
||||
search_name = search_nest = ~search;
|
||||
s = Join(Split(s, ':'), "::") + (s.EndsWith(":") ? "::" : "");
|
||||
int lineno = StrInt(s);
|
||||
if(!IsNull(lineno)) {
|
||||
|
|
@ -227,7 +236,7 @@ void AssistEditor::Search()
|
|||
ArrayMap<String, NavItem> imap;
|
||||
for(int i = 0; i < b.GetCount(); i++) {
|
||||
String nest = b.GetKey(i);
|
||||
if(ToUpper(nest).Find(search_nest) >= 0) {
|
||||
if(wholeclass ? ToUpper(nest) == search_nest : ToUpper(nest).Find(search_nest) >= 0) {
|
||||
const Array<CppItem>& ci = b[i];
|
||||
for(int j = 0; j < ci.GetCount(); j++) {
|
||||
const CppItem& m = ci[j];
|
||||
|
|
|
|||
Loading…
Reference in a new issue