aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-06-04 17:47:44 +1000
committerNeil <nyamatongwe@gmail.com>2015-06-04 17:47:44 +1000
commit0c48f964dfc4ddeb4e7ff883e5885719724c76bd (patch)
tree863822c21cc6f8e691e436c482b63e4c1a95c8c1 /src/Editor.cxx
parent8b117752e15d550ed93a3cbce9786b0df48ae49a (diff)
downloadscintilla-mirror-0c48f964dfc4ddeb4e7ff883e5885719724c76bd.tar.gz
Move FindText flag decoding from caller to function to minimize code and chance
of mistakes.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 77d9ce5e7..ce465808c 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3643,10 +3643,6 @@ long Editor::FindText(
static_cast<int>(ft->chrg.cpMin),
static_cast<int>(ft->chrg.cpMax),
ft->lpstrText,
- (wParam & SCFIND_MATCHCASE) != 0,
- (wParam & SCFIND_WHOLEWORD) != 0,
- (wParam & SCFIND_WORDSTART) != 0,
- (wParam & SCFIND_REGEXP) != 0,
static_cast<int>(wParam),
&lengthFound);
if (pos != -1) {
@@ -3694,18 +3690,10 @@ long Editor::SearchText(
try {
if (iMessage == SCI_SEARCHNEXT) {
pos = pdoc->FindText(searchAnchor, pdoc->Length(), txt,
- (wParam & SCFIND_MATCHCASE) != 0,
- (wParam & SCFIND_WHOLEWORD) != 0,
- (wParam & SCFIND_WORDSTART) != 0,
- (wParam & SCFIND_REGEXP) != 0,
static_cast<int>(wParam),
&lengthFound);
} else {
pos = pdoc->FindText(searchAnchor, 0, txt,
- (wParam & SCFIND_MATCHCASE) != 0,
- (wParam & SCFIND_WHOLEWORD) != 0,
- (wParam & SCFIND_WORDSTART) != 0,
- (wParam & SCFIND_REGEXP) != 0,
static_cast<int>(wParam),
&lengthFound);
}
@@ -3748,10 +3736,6 @@ long Editor::SearchInTarget(const char *text, int length) {
pdoc->SetCaseFolder(CaseFolderForEncoding());
try {
long pos = pdoc->FindText(targetStart, targetEnd, text,
- (searchFlags & SCFIND_MATCHCASE) != 0,
- (searchFlags & SCFIND_WHOLEWORD) != 0,
- (searchFlags & SCFIND_WORDSTART) != 0,
- (searchFlags & SCFIND_REGEXP) != 0,
searchFlags,
&lengthFound);
if (pos != -1) {