fix: check clipboard is not empty before pasting in helix mode
This commit is contained in:
parent
03f2821e5f
commit
76952a7d1b
1 changed files with 5 additions and 0 deletions
|
|
@ -897,6 +897,11 @@ fn paste_helix(ctx: command.Context, do_paste: pasting_function) command.Result
|
||||||
else
|
else
|
||||||
tui.clipboard_get_group(0);
|
tui.clipboard_get_group(0);
|
||||||
|
|
||||||
|
if (clipboard.len == 0) {
|
||||||
|
ed.logger.print("paste: nothing to paste", .{});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const b = try ed.buf_for_update();
|
const b = try ed.buf_for_update();
|
||||||
var root = b.root;
|
var root = b.root;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue