Do not write bracketed paste keys themselves if the pane has not asked

for them.
This commit is contained in:
nicm
2024-12-06 09:06:56 +00:00
parent 6d792e4123
commit 102f34090d
3 changed files with 11 additions and 3 deletions

View File

@ -1219,7 +1219,7 @@ window_pane_copy_key(struct window_pane *wp, key_code key)
}
void
window_pane_paste(struct window_pane *wp, char *buf, size_t len)
window_pane_paste(struct window_pane *wp, key_code key, char *buf, size_t len)
{
if (!TAILQ_EMPTY(&wp->modes))
return;
@ -1227,6 +1227,9 @@ window_pane_paste(struct window_pane *wp, char *buf, size_t len)
if (wp->fd == -1 || wp->flags & PANE_INPUTOFF)
return;
if (KEYC_IS_PASTE(key) && (~wp->screen->mode & MODE_BRACKETPASTE))
return;
log_debug("%s: %.*s", __func__, (int)len, buf);
bufferevent_write(wp->event, buf, len);