mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
SuggestCtrl: JustStart, ide: builder improvements
git-svn-id: svn://ultimatepp.org/upp/trunk@8046 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
0f4856ea28
commit
f03da91ced
5 changed files with 18 additions and 4 deletions
|
|
@ -93,9 +93,11 @@ bool SuggestCtrl::Key(dword key, int count)
|
|||
int h;
|
||||
WString x = CF(ReadLast(h));
|
||||
list.Clear();
|
||||
for(int i = 0; i < data.GetCount(); i++)
|
||||
if(CF(data[i]).Find(x) >= 0)
|
||||
for(int i = 0; i < data.GetCount(); i++) {
|
||||
WString h = CF(data[i]);
|
||||
if(just_start ? h.StartsWith(x) : h.Find(x) >= 0)
|
||||
list.Add(data[i]);
|
||||
}
|
||||
if(list.GetCount() == 0) {
|
||||
Cancel();
|
||||
return true;
|
||||
|
|
@ -154,6 +156,7 @@ SuggestCtrl::SuggestCtrl()
|
|||
delimiter_filter = NULL;
|
||||
droplines = 16;
|
||||
compare_filter = NULL;
|
||||
just_start = false;
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ private:
|
|||
int delimiter_char;
|
||||
int (*delimiter_filter)(int c);
|
||||
int (*compare_filter)(int c);
|
||||
bool just_start;
|
||||
|
||||
void Cancel();
|
||||
void Select();
|
||||
|
|
@ -32,6 +33,7 @@ public:
|
|||
SuggestCtrl& Delimiter(int chr) { delimiter_char = chr; return *this; }
|
||||
SuggestCtrl& Delimiter(int (*filter)(int c)) { delimiter_filter = filter; return *this; }
|
||||
SuggestCtrl& CompareFilter(int (*filter)(int c)) { compare_filter = filter; return *this; }
|
||||
SuggestCtrl& JustStart(bool b = true) { just_start = b; return *this; }
|
||||
|
||||
SuggestCtrl();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -66,4 +66,10 @@ change `',`' to `';`') before it is written to the text.&]
|
|||
]_[* CompareFilter]([@(0.0.255) int]_(`*[*@3 filter])([@(0.0.255) int]_c))&]
|
||||
[s2;%% Sets filter to be applied to text and to the suggestions before
|
||||
it is compared while searching for suggestions.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:SuggestCtrl`:`:JustStart`(bool`): [_^SuggestCtrl^ SuggestCtrl][@(0.0.255) `&]_[* JustS
|
||||
tart]([@(0.0.255) bool]_[*@3 b]_`=_[@(0.0.255) true])&]
|
||||
[s2;%% Only matches the starts of suggestions.&]
|
||||
[s3;%% &]
|
||||
[s0;%% ]]
|
||||
|
|
@ -6,7 +6,8 @@ uses
|
|||
ide\Core;
|
||||
|
||||
file
|
||||
Builders.h options PCH,
|
||||
Builders.h
|
||||
options() PCH,
|
||||
CppBuilder.cpp,
|
||||
MakeFile.cpp,
|
||||
GccBuilder.icpp,
|
||||
|
|
|
|||
|
|
@ -323,6 +323,8 @@ bool MscBuilder::BuildPackage(const String& package, Vector<String>& linkfile, V
|
|||
}
|
||||
if(pkg[i].noblitz)
|
||||
noblitz.Add(fn);
|
||||
if(ext == ".c")
|
||||
nopch.Add(fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -337,7 +339,7 @@ bool MscBuilder::BuildPackage(const String& package, Vector<String>& linkfile, V
|
|||
for(i = 0; i < sfile.GetCount(); i++) {
|
||||
String fn = sfile[i];
|
||||
String ext = ToLower(GetFileExt(fn));
|
||||
if(findarg(ext, ".rc", ".brc") < 0 && HdependFileTime(sfile[i]) > GetFileTime(CatAnyPath(outdir, GetFileTitle(fn) + ".obj")))
|
||||
if(findarg(ext, ".rc", ".brc", ".c") < 0 && HdependFileTime(sfile[i]) > GetFileTime(CatAnyPath(outdir, GetFileTitle(fn) + ".obj")))
|
||||
recompile++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue