summaryrefslogtreecommitdiff
path: root/src/exception.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2023-05-15 21:10:02 +1000
committerMaxime Coste <mawww@kakoune.org>2023-05-21 16:20:51 +1000
commitcfa658b899b44a8a0f4c7f3dd9811ae0d44ddd3a (patch)
tree80613249d2988b09ebc7eaa85a91f811959931f3 /src/exception.hh
parente140df8f0857125f40f9338450f73ff1ac50664d (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/exception.hh')
-rw-r--r--src/exception.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/exception.hh b/src/exception.hh
index 0ff3d825..28f41029 100644
--- a/src/exception.hh
+++ b/src/exception.hh
@@ -29,6 +29,11 @@ struct failure : runtime_error
using runtime_error::runtime_error;
};
+struct cancel : runtime_error
+{
+ cancel() : runtime_error("cancellation requested") {}
+};
+
struct logic_error : exception
{
};