From 76952a7d1bf8ba9c6eb92521ddfd4e11f90f6778 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Tue, 4 Nov 2025 14:09:20 +0100 Subject: [PATCH] fix: check clipboard is not empty before pasting in helix mode --- src/tui/mode/helix.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tui/mode/helix.zig b/src/tui/mode/helix.zig index a80ae05..53e3357 100644 --- a/src/tui/mode/helix.zig +++ b/src/tui/mode/helix.zig @@ -897,6 +897,11 @@ fn paste_helix(ctx: command.Context, do_paste: pasting_function) command.Result else tui.clipboard_get_group(0); + if (clipboard.len == 0) { + ed.logger.print("paste: nothing to paste", .{}); + return; + } + const b = try ed.buf_for_update(); var root = b.root;