diff options
author | Zufu Liu <unknown> | 2023-12-02 08:20:55 +1100 |
---|---|---|
committer | Zufu Liu <unknown> | 2023-12-02 08:20:55 +1100 |
commit | e6538bb38cd509111f0f595f46e7d1ff71bcc017 (patch) | |
tree | cdf847b194f9431c64d2b527c7b216e7486aceb2 /src/RESearch.h | |
parent | c8ca5050cf8c908e49d28eda5642542f7ac1155b (diff) | |
download | scintilla-mirror-e6538bb38cd509111f0f595f46e7d1ff71bcc017.tar.gz |
Bug [#2157]. Fix regular expression search for word begin \< and word end \>.
Diffstat (limited to 'src/RESearch.h')
-rw-r--r-- | src/RESearch.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/RESearch.h b/src/RESearch.h index b7955dc79..e3a9c8110 100644 --- a/src/RESearch.h +++ b/src/RESearch.h @@ -24,6 +24,10 @@ public: void Clear(); const char *Compile(const char *pattern, Sci::Position length, bool caseSensitive, bool posix); int Execute(const CharacterIndexer &ci, Sci::Position lp, Sci::Position endp); + void SetLineRange(Sci::Position startPos, Sci::Position endPos) noexcept { + lineStartPos = startPos; + lineEndPos = endPos; + } static constexpr int MAXTAG = 10; static constexpr int NOTFOUND = -1; @@ -47,7 +51,9 @@ private: Sci::Position PMatch(const CharacterIndexer &ci, Sci::Position lp, Sci::Position endp, const char *ap); - Sci::Position bol; + // positions to match line start and line end + Sci::Position lineStartPos; + Sci::Position lineEndPos; char nfa[MAXNFA]; /* automaton */ int sta; int failure; |