diff options
Diffstat (limited to 'src/Document.cxx')
| -rw-r--r-- | src/Document.cxx | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/src/Document.cxx b/src/Document.cxx index 3f365fdf4..3065b1828 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1646,10 +1646,13 @@ Document::CharacterExtracted Document::ExtractCharacter(int position) const {   * Has not been tested with backwards DBCS searches yet.   */  long Document::FindText(int minPos, int maxPos, const char *search, -                        bool caseSensitive, bool word, bool wordStart, bool regExp, int flags, -                        int *length) { +                        int flags, int *length) {  	if (*length <= 0)  		return minPos; +	const bool caseSensitive = (flags & SCFIND_MATCHCASE) != 0; +	const bool word = (flags & SCFIND_WHOLEWORD) != 0; +	const bool wordStart = (flags & SCFIND_WORDSTART) != 0; +	const bool regExp = (flags & SCFIND_REGEXP) != 0;  	if (regExp) {  		if (!regex)  			regex = CreateRegexSearch(&charClass); | 
