summaryrefslogtreecommitdiffstats
path: root/cmd-paste-buffer.c
diff options
context:
space:
mode:
authornicm <nicm>2024-02-13 08:03:50 +0000
committernicm <nicm>2024-02-13 08:03:50 +0000
commit4bdb855020d266ea0a480a53e13c806fcaad9b45 (patch)
tree12c3d3932ac91bacf55700f13a6b403f3e65ec7d /cmd-paste-buffer.c
parent428f8a9b2884093b5f40b64797753871ddfa67b0 (diff)
Do not allow paste into panes which have exited, from Romain Francoise
in GitHub issue 3830.
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 28d4a8cc..bef39593 100644
--- a/cmd-paste-buffer.c
+++ b/cmd-paste-buffer.c
@@ -55,6 +55,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');