diff options
| author | Maxime Coste <mawww@kakoune.org> | 2023-05-15 21:10:02 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2023-05-21 16:20:51 +1000 |
| commit | cfa658b899b44a8a0f4c7f3dd9811ae0d44ddd3a (patch) | |
| tree | 80613249d2988b09ebc7eaa85a91f811959931f3 /src/normal.cc | |
| parent | e140df8f0857125f40f9338450f73ff1ac50664d (diff) | |
Add <c-g> to cancel current operation
The current implementation only does this during regex operations,
but should be extensible to other operations that might take a long
time by regularly calling EventManager::handle_urgent_events().
Diffstat (limited to 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/normal.cc b/src/normal.cc index 4c6e0203..f1123ca7 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -1159,7 +1159,7 @@ void keep(Context& context, NormalParams params) const auto flags = match_flags(is_bol(begin.coord()), false, is_bow(buffer, begin.coord()), is_eow(buffer, end.coord())); - if (regex_search(begin, end, begin, end, regex, flags) == matching) + if (regex_search(begin, end, begin, end, regex, flags, EventManager::handle_urgent_events) == matching) keep.push_back(sel); } if (keep.empty()) |
