diff options
| author | Maxime Coste <mawww@kakoune.org> | 2023-02-14 17:13:31 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2023-02-14 17:13:31 +1100 |
| commit | 85ceef29bdc3e9fe8cd42770f9191ad48726bda5 (patch) | |
| tree | 992cf24c17da974da72d8fb5a6acb7f3abadc92f /src/regex_impl.cc | |
| parent | d708b77186c1685dcbd2298246ada7d204acec2f (diff) | |
Fix broken corner cases in DualThreadStack::grow_ifn
We only grow when the ring buffer is full, which allows for a nice
simplification of the code.
Tell grow_ifn if we pushed in current or next so that we can
distinguish between filled by next or filled by current when
m_current == m_next_begin
Diffstat (limited to 'src/regex_impl.cc')
| -rw-r--r-- | src/regex_impl.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/regex_impl.cc b/src/regex_impl.cc index 09efdb75..23321af8 100644 --- a/src/regex_impl.cc +++ b/src/regex_impl.cc @@ -1579,6 +1579,11 @@ auto test_regex = UnitTest{[]{ } { + TestVM<RegexMode::Forward | RegexMode::Search> vm{".{40}"}; + kak_assert(vm.exec("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", RegexExecFlags::None)); + } + + { auto eq = [](const CompiledRegex::NamedCapture& lhs, const CompiledRegex::NamedCapture& rhs) { return lhs.name == rhs.name and |
