summaryrefslogtreecommitdiffstats
path: root/cmd-paste-buffer.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2024-02-13 10:01:10 +0000
committerThomas Adam <thomas@xteddy.org>2024-02-13 10:01:10 +0000
commit0960862950476a5a519905487d731a8b843d07c2 (patch)
tree72b24ad259c3e0c78f1cf166b35b60e718240eab /cmd-paste-buffer.c
parent44ad25b3673cf9fddc92ed122e51cd9beb50d4f7 (diff)
parent40b97b1715182b0ab0274b0c402b34e2cba98f04 (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-paste-buffer.c')
-rw-r--r--cmd-paste-buffer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd-paste-buffer.c b/cmd-paste-buffer.c
index 36326e18..269e92f7 100644
--- a/cmd-paste-buffer.c
+++ b/cmd-paste-buffer.c
@@ -54,6 +54,11 @@ cmd_paste_buffer_exec(struct cmd *self, struct cmdq_item *item)
size_t seplen, bufsize;
int bracket = args_has(args, 'p');
+ if (window_pane_exited(wp)) {
+ cmdq_error(item, "target pane has exited");
+ return (CMD_RETURN_ERROR);
+ }
+
bufname = NULL;
if (args_has(args, 'b'))
bufname = args_get(args, 'b');