summaryrefslogtreecommitdiff
path: root/src/regex.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-12-29 09:55:53 +1100
committerMaxime Coste <mawww@kakoune.org>2017-12-29 09:55:53 +1100
commit6333ae207f0fb3c7a6b69a684bf80c2041764871 (patch)
tree2415dc2c029c2762ed9bd084f34fef71cde59e1d /src/regex.hh
parent6851604546f3f834541fc85a63987f4714f1f6a4 (diff)
Correctly set the NotBeginOfSubject/NotEndOfSubject flags for regex matching
Fixes #1778
Diffstat (limited to 'src/regex.hh')
-rw-r--r--src/regex.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/regex.hh b/src/regex.hh
index 01d6bc79..cbd4a14a 100644
--- a/src/regex.hh
+++ b/src/regex.hh
@@ -100,12 +100,14 @@ private:
Vector<Iterator, MemoryDomain::Regex> m_values;
};
-inline RegexExecFlags match_flags(bool bol, bool eol, bool bow, bool eow)
+inline RegexExecFlags match_flags(bool bol, bool eol, bool bow, bool eow, bool bos, bool eos)
{
return (bol ? RegexExecFlags::None : RegexExecFlags::NotBeginOfLine) |
(eol ? RegexExecFlags::None : RegexExecFlags::NotEndOfLine) |
(bow ? RegexExecFlags::None : RegexExecFlags::NotBeginOfWord) |
- (eow ? RegexExecFlags::None : RegexExecFlags::NotEndOfWord);
+ (eow ? RegexExecFlags::None : RegexExecFlags::NotEndOfWord) |
+ (bos ? RegexExecFlags::None : RegexExecFlags::NotBeginOfSubject) |
+ (eos ? RegexExecFlags::None : RegexExecFlags::NotEndOfSubject);
}
template<typename It>