diff options
| author | Maxime Coste <mawww@kakoune.org> | 2021-11-01 09:05:57 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2021-11-01 09:05:57 +1100 |
| commit | 8299d1da1f4e3fd856dc81ff1c8ec584714582e0 (patch) | |
| tree | afd2358051991b6cfe76931d41c5277adb971bed /src | |
| parent | d2e2caaae6119b5abc2aca3a95e2da7db547eac3 (diff) | |
Fix pasting all from empty register
Raise an error if the register is empty for paste-all
Fixes #4414
Diffstat (limited to 'src')
| -rw-r--r-- | src/normal.cc | 3 |
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(); |
