Forgot to add find_replace.hpp

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@301 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-24 20:53:19 +00:00
parent c8f5b8c4a2
commit e1c067a9a1
2 changed files with 49 additions and 2 deletions
+1 -2
View File
@@ -702,8 +702,7 @@ bool TextValueEditor::search(FindInfo& find, bool from_start) {
size_t selection_max = index_to_untagged(value().value(), max(selection_start_i, selection_end_i));
if (find.forward()) {
size_t start = min(v.size(), find.searchSelection() ? selection_min : selection_max);
size_t end = max(0, (int)v.size() - (int)find.findString().size());
for (size_t i = start ; i <= end ; ++i) {
for (size_t i = start ; i + find.findString().size()) <= v.size() ; ++i) {
if (matchSubstr(v, i, find)) return true;
}
} else {