mirror of
https://github.com/tmux/tmux.git
synced 2025-12-21 14:56:05 +00:00
If tmux receives a palette request (OSC 4) in a pane and the palette
entry has not been set, send a request to the most recently used client and forward any response instead. Based on change from Tim Culverhouse in GitHub issue 4665.
This commit is contained in:
26
tmux.h
26
tmux.h
@@ -53,6 +53,8 @@ struct format_tree;
|
||||
struct hyperlinks_uri;
|
||||
struct hyperlinks;
|
||||
struct input_ctx;
|
||||
struct input_request;
|
||||
struct input_requests;
|
||||
struct job;
|
||||
struct menu_data;
|
||||
struct mode_tree_data;
|
||||
@@ -1092,6 +1094,26 @@ struct window_mode_entry {
|
||||
TAILQ_ENTRY(window_mode_entry) entry;
|
||||
};
|
||||
|
||||
/* Type of request to client. */
|
||||
enum input_request_type {
|
||||
INPUT_REQUEST_PALETTE
|
||||
};
|
||||
#define INPUT_REQUEST_TYPES (1)
|
||||
|
||||
/* Palette request reply data. */
|
||||
struct input_request_palette_data {
|
||||
int idx;
|
||||
int c;
|
||||
};
|
||||
|
||||
/* Request sent to client on behalf of pane. */
|
||||
TAILQ_HEAD(input_requests, input_request);
|
||||
struct input_request_list {
|
||||
struct client *c;
|
||||
enum input_request_type type;
|
||||
struct input_requests requests;
|
||||
};
|
||||
|
||||
/* Offsets into pane buffer. */
|
||||
struct window_pane_offset {
|
||||
size_t used;
|
||||
@@ -1920,6 +1942,8 @@ struct client {
|
||||
struct status_line status;
|
||||
enum client_theme theme;
|
||||
|
||||
struct input_request_list input_requests[INPUT_REQUEST_TYPES];
|
||||
|
||||
#define CLIENT_TERMINAL 0x1
|
||||
#define CLIENT_LOGIN 0x2
|
||||
#define CLIENT_EXIT 0x4
|
||||
@@ -2922,6 +2946,8 @@ void input_parse_screen(struct input_ctx *, struct screen *,
|
||||
void input_reply_clipboard(struct bufferevent *, const char *, size_t,
|
||||
const char *);
|
||||
void input_set_buffer_size(size_t);
|
||||
void input_request_reply(struct client *, enum input_request_type, void *);
|
||||
void input_cancel_requests(struct client *);
|
||||
|
||||
/* input-key.c */
|
||||
void input_key_build(void);
|
||||
|
||||
Reference in New Issue
Block a user