Add a five second limit on pasting for terminals which mysteriously lose

the end sequence if the paste is too big (that is, Terminal.app).
Reported by Garri Djavadyan in GitHub issue 4527.
This commit is contained in:
nicm
2026-05-17 13:01:04 +00:00
parent b24b8424b1
commit bbea6e6375
2 changed files with 13 additions and 0 deletions

4
tmux.h
View File

@@ -1945,6 +1945,9 @@ struct client_window {
};
RB_HEAD(client_windows, client_window);
/* Maximum time to be pasting. */
#define CLIENT_PASTE_TIME_LIMIT 5
/* Client connection. */
typedef int (*prompt_input_cb)(struct client *, void *, const char *, int);
typedef void (*prompt_free_cb)(void *);
@@ -2084,6 +2087,7 @@ struct client {
struct key_table *keytable;
key_code last_key;
time_t paste_time;
uint64_t redraw_panes;
uint64_t redraw_scrollbars;