diff --git a/uppsrc/ide/Goto.cpp b/uppsrc/ide/Goto.cpp index 7313eed42..a3973a752 100644 --- a/uppsrc/ide/Goto.cpp +++ b/uppsrc/ide/Goto.cpp @@ -23,7 +23,7 @@ struct GotoDlg : public WithGotoLayout { void GotoDlg::SyncList() { list.Clear(); - String n = ~target; + String n = ToLower((String)~target); int typei = Null; String scope = Null; Vector h = Split(n, ':'); @@ -51,6 +51,14 @@ void GotoDlg::SyncList() if(IsDigit(*n)) n.Clear(); Index nc; + for(int i = 0; i < item.GetCount(); i++) { + const CppItemInfo& f = item[i]; + if(ToLower(f.name).Find(n) >= 0 && (IsNull(typei) || typei == f.typei) && (IsNull(scope) || scope == f.scope)) { + list.Add(f.scope, RawToValue(f), f.item, f.line, GetCppFile(f.file), f.scope); + nc.FindAdd(f.scope); + } + } +/* for(int ci = 0; ci < (n.GetCount() ? 2 : 1); ci++) for(int i = 0; i < item.GetCount(); i++) { const CppItemInfo& f = item[i]; @@ -63,6 +71,7 @@ void GotoDlg::SyncList() nc.FindAdd(f.scope); } } +*/ list.HeaderTab(0).SetText(Format("Scope (%d)", nc.GetCount())); list.HeaderTab(1).SetText(Format("Symbol (%d)", list.GetCount())); SyncOk(); @@ -89,7 +98,7 @@ void GotoDlg::SyncOk() int GotoFilter(int c) { - return IsDigit(c) || IsAlpha(c) || c == '_' || c == ':' ? c : c == '.' ? ':' : 0; + return IsDigit(c) || IsAlpha(c) || c == '_' || c == ':' ? ToUpper(c) : c == '.' ? ':' : 0; } void GotoDlg::Serialize(Stream& s) diff --git a/uppsrc/ide/Virtuals.cpp b/uppsrc/ide/Virtuals.cpp index 947414f22..90c37aa38 100644 --- a/uppsrc/ide/Virtuals.cpp +++ b/uppsrc/ide/Virtuals.cpp @@ -57,18 +57,18 @@ struct VirtualsDlg : public WithVirtualsLayout { } void Sync() { - String name = ~find; + String name = ToLower((String)~find); String k = list.GetKey(); list.Clear(); - for(int i = 0; i < item.GetCount(); i++) { - CppItemInfo f; - (CppItem&)f = item[i]; - f.virt = false; - f.name = item[i].name; - if(memcmp_i(name, f.name, name.GetCount()) == 0) + for(int i = 0; i < item.GetCount(); i++) + if(ToLower(item[i].name).Find(name) >= 0) { + CppItemInfo f; + (CppItem&)f = item[i]; + f.virt = false; + f.name = item[i].name; list.Add(item.GetKey(i), f.natural, RawToValue(f), - item[i].defined, item[i].overed); - } + item[i].defined, item[i].overed); + } if(!list.FindSetCursor(k)) list.GoBegin(); } @@ -103,6 +103,7 @@ struct VirtualsDlg : public WithVirtualsLayout { list.MultiSelect(); list.EvenRowColor(); Sizeable().Zoomable(); + find.SetFilter(SearchItemFilter); find <<= THISBACK(Sync); Sync(); } diff --git a/uppsrc/ide/ide.lay b/uppsrc/ide/ide.lay index ce2c39504..38cb4151b 100644 --- a/uppsrc/ide/ide.lay +++ b/uppsrc/ide/ide.lay @@ -527,8 +527,8 @@ LAYOUT(VirtualsLayout, 712, 496) ITEM(ArrayCtrl, list, HSizePosZ(8, 8).VSizePosZ(8, 40)) ITEM(Button, ok, SetLabel(t_("OK")).RightPosZ(80, 64).BottomPosZ(8, 24)) ITEM(Button, cancel, SetLabel(t_("Cancel")).RightPosZ(12, 64).BottomPosZ(8, 24)) - ITEM(Label, dv___3, SetLabel(t_("Find")).LeftPosZ(8, 28).BottomPosZ(9, 19)) - ITEM(EditString, find, LeftPosZ(36, 124).BottomPosZ(9, 19)) + ITEM(Label, dv___3, SetLabel(t_("Find")).LeftPosZ(8, 60).BottomPosZ(9, 19)) + ITEM(EditString, find, LeftPosZ(72, 124).BottomPosZ(9, 19)) END_LAYOUT LAYOUT(UppOptDlg, 520, 68)