fix(vim): paste crash on empty clipboard
This commit is contained in:
parent
eb77164b13
commit
dc4d16b062
1 changed files with 5 additions and 0 deletions
|
|
@ -3345,6 +3345,11 @@ pub const Editor = struct {
|
||||||
else
|
else
|
||||||
tui.clipboard_get_group(0);
|
tui.clipboard_get_group(0);
|
||||||
|
|
||||||
|
if (clipboard.len == 0) {
|
||||||
|
self.logger.print("paste: nothing to paste", .{});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const b = try self.buf_for_update();
|
const b = try self.buf_for_update();
|
||||||
var root = b.root;
|
var root = b.root;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue