From 9258e76edf918a09e812face4af9eb66cc8771cd Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 4 Mar 2003 10:53:59 +0000 Subject: Patch from Jakub to optionally implement more POSIX compatible regular expressions. \(..\) changes to (..) Fixes problem where find previous would not find earlier matches on same line. --- src/Editor.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index b3509510d..7569d5a60 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3988,7 +3988,7 @@ void Editor::Indent(bool forwards) { */ long Editor::FindText( uptr_t wParam, ///< Search modes : @c SCFIND_MATCHCASE, @c SCFIND_WHOLEWORD, - ///< @c SCFIND_WORDSTART or @c SCFIND_REGEXP. + ///< @c SCFIND_WORDSTART, @c SCFIND_REGEXP or @c SCFIND_POSIX. sptr_t lParam) { ///< @c TextToFind structure: The text to search for in the given range. TextToFind *ft = reinterpret_cast(lParam); @@ -3998,6 +3998,7 @@ long Editor::FindText( (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, &lengthFound); if (pos != -1) { ft->chrgText.cpMin = pos; @@ -4041,6 +4042,7 @@ long Editor::SearchText( (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, &lengthFound); } else { pos = pdoc->FindText(searchAnchor, 0, txt, @@ -4048,6 +4050,7 @@ long Editor::SearchText( (wParam & SCFIND_WHOLEWORD) != 0, (wParam & SCFIND_WORDSTART) != 0, (wParam & SCFIND_REGEXP) != 0, + (wParam & SCFIND_POSIX) != 0, &lengthFound); } @@ -4069,6 +4072,7 @@ long Editor::SearchInTarget(const char *text, int length) { (searchFlags & SCFIND_WHOLEWORD) != 0, (searchFlags & SCFIND_WORDSTART) != 0, (searchFlags & SCFIND_REGEXP) != 0, + (searchFlags & SCFIND_POSIX) != 0, &lengthFound); if (pos != -1) { targetStart = pos; -- cgit v1.2.3