summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOlivier Perret <Olivier.Perret@mailbox.org>2020-12-03 21:42:14 +0100
committerOlivier Perret <Olivier.Perret@mailbox.org>2020-12-03 21:42:14 +0100
commitf2fb5a3214612fb35f89ad552ee75ef4bb0dde4c (patch)
treeeb449cd731900f05a7ab695a2f3224f3703b9e01 /src
parent586f79c30de2185a18f5f769e625184dd10fa40f (diff)
Throw no_selections_remaining when using <a-space>
This makes it possible to use the mechanism introduced by 91386a53
Diffstat (limited to 'src')
-rw-r--r--src/normal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 618c0008..fba39d17 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -2106,7 +2106,7 @@ void remove_selection(Context& context, NormalParams p)
if (index >= selections.size())
throw runtime_error{format("invalid selection index: {}", index)};
if (selections.size() == 1)
- throw runtime_error{"cannot remove the last selection"};
+ throw no_selections_remaining{};
selections.remove(index);
selections.check_invariant();