diff --git a/uppsrc/Core/StrUtil.cpp b/uppsrc/Core/StrUtil.cpp index 1ade9717e..72a30382b 100644 --- a/uppsrc/Core/StrUtil.cpp +++ b/uppsrc/Core/StrUtil.cpp @@ -116,7 +116,7 @@ String FilterWhile(const char *s, int (*filter)(int)) WString Filter(const wchar *s, int (*filter)(int)) { - String result; + WString result; while(*s) { int c = (*filter)((byte)*s++); if(c) result.Cat(c); @@ -126,7 +126,7 @@ WString Filter(const wchar *s, int (*filter)(int)) WString FilterWhile(const wchar *s, int (*filter)(int)) { - String result; + WString result; while(*s) { int c = (*filter)((byte)*s++); if(!c) break; diff --git a/uppsrc/ide/Browser/CodeBrowser.cpp b/uppsrc/ide/Browser/CodeBrowser.cpp index b0f790303..f47c21748 100644 --- a/uppsrc/ide/Browser/CodeBrowser.cpp +++ b/uppsrc/ide/Browser/CodeBrowser.cpp @@ -180,6 +180,7 @@ void CodeBrowser::LoadScope() String scope = file < 0 ? String(x) : String(); int q = CodeBase().Find(scope); bool filematch = file >= 0 && MatchCib(GetFileText(GetCppFile(file)), find); + bool scopematch = !filematch && MatchCib(scope, find); if(q >= 0) { const Array& n = CodeBase()[q]; VectorMap inherited; @@ -189,7 +190,7 @@ void CodeBrowser::LoadScope() for(int i = 0; i < n.GetCount(); i = file < 0 ? FindNext(n, i) : i + 1) { CppItemInfo m; (CppItem&) m = n[i]; - if((find.GetCount() && m.uname.StartsWith(find) || filematch && m.file == file) && set.Find(m.qitem) < 0) { + if((find.GetCount() && m.uname.StartsWith(find) || filematch && m.file == file || scopematch) && set.Find(m.qitem) < 0) { set.Add(m.qitem); int q = inherited.Find(m.qitem); if(q >= 0) {