summaryrefslogtreecommitdiff
path: root/src/normal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/normal.cc')
-rw-r--r--src/normal.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/normal.cc b/src/normal.cc
index 64daabc6..8d2ed82c 100644
--- a/src/normal.cc
+++ b/src/normal.cc
@@ -720,6 +720,9 @@ void paste_all(Context& context, NormalParams params)
offsets.push_back(all.length());
}
+ if (offsets.empty())
+ throw runtime_error("nothing to paste");
+
Buffer& buffer = context.buffer();
Vector<Selection> result;
auto& selections = context.selections();