summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2021-11-02 21:09:25 +1100
committerMaxime Coste <mawww@kakoune.org>2021-11-02 21:09:25 +1100
commite7adb01316be7da3aaeaa9765c69108e2af3c9f5 (patch)
tree9d33e1e20b672f592b15d1cc3781733838dec6ad /src
parent0f688656a487fdb2e7d0772de82dd6941418bf67 (diff)
parent9be2a1f170c3936e3296959492275429fd7e31bb (diff)
Merge remote-tracking branch 'sidkshatriya/remove-kak-history-file'
Diffstat (limited to 'src')
-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();