From 42ba6c1b229c92256274e848e9c5ff1d59d9081b Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 2 Aug 2022 11:09:26 +0000 Subject: Add a third state "all" to allow-passthrough to work even in invisible panes, from Sergei Grechanik in GitHub issue 3274. --- tmux.h | 46 +++++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 19 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 3f720e50..4196a31c 100644 --- a/tmux.h +++ b/tmux.h @@ -1431,38 +1431,45 @@ struct tty_ctx { void *ptr; void *ptr2; + /* + * Whether this command should be sent even when the pane is not + * visible (used for a passthrough sequence when allow-passthrough is + * "all"). + */ + int allow_invisible_panes; + /* * Cursor and region position before the screen was updated - this is * where the command should be applied; the values in the screen have * already been updated. */ - u_int ocx; - u_int ocy; + u_int ocx; + u_int ocy; - u_int orupper; - u_int orlower; + u_int orupper; + u_int orlower; /* Target region (usually pane) offset and size. */ - u_int xoff; - u_int yoff; - u_int rxoff; - u_int ryoff; - u_int sx; - u_int sy; + u_int xoff; + u_int yoff; + u_int rxoff; + u_int ryoff; + u_int sx; + u_int sy; /* The background colour used for clearing (erasing). */ - u_int bg; + u_int bg; /* The default colours and palette. */ - struct grid_cell defaults; - struct colour_palette *palette; + struct grid_cell defaults; + struct colour_palette *palette; /* Containing region (usually window) offset and size. */ - int bigger; - u_int wox; - u_int woy; - u_int wsx; - u_int wsy; + int bigger; + u_int wox; + u_int woy; + u_int wsx; + u_int wsy; }; /* Saved message entry. */ @@ -2889,7 +2896,8 @@ void screen_write_collect_add(struct screen_write_ctx *, void screen_write_cell(struct screen_write_ctx *, const struct grid_cell *); void screen_write_setselection(struct screen_write_ctx *, const char *, u_char *, u_int); -void screen_write_rawstring(struct screen_write_ctx *, u_char *, u_int); +void screen_write_rawstring(struct screen_write_ctx *, u_char *, u_int, + int); void screen_write_alternateon(struct screen_write_ctx *, struct grid_cell *, int); void screen_write_alternateoff(struct screen_write_ctx *, -- cgit From 03149bf7f62e2c92d0e60087c52604d2dd51794f Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 15 Aug 2022 08:54:03 +0000 Subject: Add a Nobr terminfo capability to tell tmux the terminal does not use bright colours for bold (makes a difference to how tmux applies palette differences). From Damien Tardy-Panis in GitHub issue 3301. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 4196a31c..413d8c38 100644 --- a/tmux.h +++ b/tmux.h @@ -514,6 +514,7 @@ enum tty_code_code { TTYC_KUP6, TTYC_KUP7, TTYC_MS, + TTYC_NOBR, TTYC_OL, TTYC_OP, TTYC_RECT, -- cgit From 7c2dcd72380dc2d9e119e99cb423a67ae17b6bd2 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 15 Aug 2022 09:10:34 +0000 Subject: Notify when a paste buffer is deleted, GitHub issue 3302 from George Nachman. --- tmux.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 413d8c38..9b43e0fd 100644 --- a/tmux.h +++ b/tmux.h @@ -2154,6 +2154,7 @@ void notify_winlink(const char *, struct winlink *); void notify_session_window(const char *, struct session *, struct window *); void notify_window(const char *, struct window *); void notify_pane(const char *, struct window_pane *); +void notify_paste_buffer(const char *); /* options.c */ struct options *options_create(struct options *); @@ -3174,6 +3175,7 @@ void control_notify_session_renamed(struct session *); void control_notify_session_created(struct session *); void control_notify_session_closed(struct session *); void control_notify_session_window_changed(struct session *); +void control_notify_paste_buffer_changed(const char *); /* session.c */ extern struct sessions sessions; -- cgit From 9cc8e40aa08ff91bc1c5d0211c1d2cef02f2c7a2 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 28 Sep 2022 07:55:29 +0000 Subject: Add a -T flag to capture-pane to stop at the last used cell instead of the full width. Restore the previous behaviour by making it default to off unless -J is used (the only time it matters). Fixes mosh unit tests; GitHub issue 3339. --- tmux.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 9b43e0fd..77019edc 100644 --- a/tmux.h +++ b/tmux.h @@ -667,6 +667,14 @@ struct colour_palette { #define GRID_LINE_EXTENDED 0x2 #define GRID_LINE_DEAD 0x4 +/* Grid string flags. */ +#define GRID_STRING_WITH_SEQUENCES 0x1 +#define GRID_STRING_ESCAPE_SEQUENCES 0x2 +#define GRID_STRING_TRIM_SPACES 0x4 +#define GRID_STRING_USED_ONLY 0x8 +#define GRID_STRING_EMPTY_CELLS 0x10 + +/* Cell positions. */ #define CELL_INSIDE 0 #define CELL_TOPBOTTOM 1 #define CELL_LEFTRIGHT 2 @@ -681,6 +689,7 @@ struct colour_palette { #define CELL_JOIN 11 #define CELL_OUTSIDE 12 +/* Cell borders. */ #define CELL_BORDERS " xqlkmjwvtun~" #define SIMPLE_BORDERS " |-+++++++++." #define PADDED_BORDERS " " @@ -2783,7 +2792,7 @@ void grid_clear_lines(struct grid *, u_int, u_int, u_int); void grid_move_lines(struct grid *, u_int, u_int, u_int, u_int); void grid_move_cells(struct grid *, u_int, u_int, u_int, u_int, u_int); char *grid_string_cells(struct grid *, u_int, u_int, u_int, - struct grid_cell **, int, int, int, struct screen *); + struct grid_cell **, int, struct screen *); void grid_duplicate_lines(struct grid *, u_int, struct grid *, u_int, u_int); void grid_reflow(struct grid *, u_int); -- cgit From 8edece2cdb7b4425526bae904506a246edbb6409 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 28 Oct 2022 13:00:02 +0000 Subject: Add paste-buffer-deleted notification and fix name of paste-buffer-changed. --- tmux.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 77019edc..a0f9f461 100644 --- a/tmux.h +++ b/tmux.h @@ -2163,7 +2163,7 @@ void notify_winlink(const char *, struct winlink *); void notify_session_window(const char *, struct session *, struct window *); void notify_window(const char *, struct window *); void notify_pane(const char *, struct window_pane *); -void notify_paste_buffer(const char *); +void notify_paste_buffer(const char *, int); /* options.c */ struct options *options_create(struct options *); @@ -3185,6 +3185,7 @@ void control_notify_session_created(struct session *); void control_notify_session_closed(struct session *); void control_notify_session_window_changed(struct session *); void control_notify_paste_buffer_changed(const char *); +void control_notify_paste_buffer_deleted(const char *); /* session.c */ extern struct sessions sessions; -- cgit From 2d08235987efa1e2f9c932c4a5c8a0200b4804c1 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 1 Nov 2022 09:54:13 +0000 Subject: Add modified Tab key sequences, from Aaron Jensen, GitHub issue 3368. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index a0f9f461..6cb6cc96 100644 --- a/tmux.h +++ b/tmux.h @@ -137,6 +137,7 @@ struct winlink; #define KEYC_IMPLIED_META 0x08000000000000ULL #define KEYC_BUILD_MODIFIERS 0x10000000000000ULL #define KEYC_VI 0x20000000000000ULL +#define KEYC_EXTENDED 0x40000000000000ULL /* Masks for key bits. */ #define KEYC_MASK_MODIFIERS 0x00f00000000000ULL -- cgit From fe475bd856ff1f98bf8a4cd9b6aedd5da81a7e3c Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 11 Nov 2022 08:37:55 +0000 Subject: Parse primary device attributes as well as secondary and add a SIXEL flag (not used yet), from Anindya Mukherjee. --- tmux.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 6cb6cc96..8c5e071f 100644 --- a/tmux.h +++ b/tmux.h @@ -543,6 +543,7 @@ enum tty_code_code { TTYC_SMUL, TTYC_SMULX, TTYC_SMXX, + TTYC_SXL, TTYC_SS, TTYC_SWD, TTYC_SYNC, @@ -1349,6 +1350,7 @@ struct tty_term { #define TERM_DECFRA 0x8 #define TERM_RGBCOLOURS 0x10 #define TERM_VT100LIKE 0x20 +#define TERM_SIXEL 0x40 int flags; LIST_ENTRY(tty_term) entry; @@ -1405,9 +1407,10 @@ struct tty { #define TTY_OPENED 0x20 #define TTY_OSC52QUERY 0x40 #define TTY_BLOCK 0x80 -#define TTY_HAVEDA 0x100 +#define TTY_HAVEDA 0x100 /* Primary DA. */ #define TTY_HAVEXDA 0x200 #define TTY_SYNCING 0x400 +#define TTY_HAVEDA2 0x800 /* Seconday DA. */ int flags; struct tty_term *term; -- cgit From 7e497c7f2303b29b0f44fe360a78c44ca86b87f9 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 7 Dec 2022 09:44:44 +0000 Subject: Process escape sequences in show-buffer, GitHub issue 3401. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 8c5e071f..9a13162d 100644 --- a/tmux.h +++ b/tmux.h @@ -2550,6 +2550,7 @@ u_int cmdq_next(struct client *); struct cmdq_item *cmdq_running(struct client *); void cmdq_guard(struct cmdq_item *, const char *, int); void printflike(2, 3) cmdq_print(struct cmdq_item *, const char *, ...); +void cmdq_print_data(struct cmdq_item *, int, struct evbuffer *); void printflike(2, 3) cmdq_error(struct cmdq_item *, const char *, ...); /* cmd-wait-for.c */ -- cgit From 3b3f42053a5f11af5285392a5a072facbc16f4a9 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 16 Dec 2022 08:13:40 +0000 Subject: Add send-keys -K to handle keys directly as if typed (so look up in key table). GitHub issue 3361. --- tmux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 9a13162d..5b15c1e1 100644 --- a/tmux.h +++ b/tmux.h @@ -2387,7 +2387,7 @@ void tty_keys_free(struct tty *); int tty_keys_next(struct tty *); /* arguments.c */ -void args_set(struct args *, u_char, struct args_value *); +void args_set(struct args *, u_char, struct args_value *, int); struct args *args_create(void); struct args *args_parse(const struct args_parse *, struct args_value *, u_int, char **); -- cgit From 3fe01ff09c2fe8629ebd5b0f2c2ce3aa5fa33c14 Mon Sep 17 00:00:00 2001 From: jmc Date: Mon, 26 Dec 2022 19:16:03 +0000 Subject: spelling fixes; from paul tagliamonte amendments to his diff are noted on tech --- tmux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 5b15c1e1..dac23ebb 100644 --- a/tmux.h +++ b/tmux.h @@ -1410,7 +1410,7 @@ struct tty { #define TTY_HAVEDA 0x100 /* Primary DA. */ #define TTY_HAVEXDA 0x200 #define TTY_SYNCING 0x400 -#define TTY_HAVEDA2 0x800 /* Seconday DA. */ +#define TTY_HAVEDA2 0x800 /* Secondary DA. */ int flags; struct tty_term *term; -- cgit From a41a92744188ec5c8a8d4ddc100ec15b52d04603 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 3 Jan 2023 11:43:24 +0000 Subject: Query the client terminal for foreground and background colours and if OSC 10 or 11 is received but no colour has been set inside tmux, return the colour from the first attached client (probably most people will have all light or or all dark terminals). --- tmux.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index dac23ebb..7d7a7609 100644 --- a/tmux.h +++ b/tmux.h @@ -1380,6 +1380,8 @@ struct tty { u_int osy; int mode; + int fg; + int bg; u_int rlower; u_int rupper; @@ -1411,6 +1413,10 @@ struct tty { #define TTY_HAVEXDA 0x200 #define TTY_SYNCING 0x400 #define TTY_HAVEDA2 0x800 /* Secondary DA. */ +#define TTY_HAVEFG 0x1000 +#define TTY_HAVEBG 0x2000 +#define TTY_ALL_REQUEST_FLAGS \ + (TTY_HAVEDA|TTY_HAVEDA2|TTY_HAVEXDA|TTY_HAVEFG|TTY_HAVEBG) int flags; struct tty_term *term; @@ -2759,6 +2765,7 @@ int colour_fromstring(const char *s); int colour_256toRGB(int); int colour_256to16(int); int colour_byname(const char *); +int colour_parseX11(const char *); void colour_palette_init(struct colour_palette *); void colour_palette_clear(struct colour_palette *); void colour_palette_free(struct colour_palette *); -- cgit From 09afc6c8ee971918d925c441c41a9de7f598efb7 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 6 Jan 2023 07:09:27 +0000 Subject: If a pane is killed, cancel reading from the file. GitHub issue 3422. --- tmux.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 7d7a7609..bb33b312 100644 --- a/tmux.h +++ b/tmux.h @@ -2611,7 +2611,9 @@ void file_print_buffer(struct client *, void *, size_t); void printflike(2, 3) file_error(struct client *, const char *, ...); void file_write(struct client *, const char *, int, const void *, size_t, client_file_cb, void *); -void file_read(struct client *, const char *, client_file_cb, void *); +struct client_file *file_read(struct client *, const char *, client_file_cb, + void *); +void file_cancel(struct client_file *); void file_push(struct client_file *); int file_write_left(struct client_files *); void file_write_open(struct client_files *, struct tmuxpeer *, @@ -2623,6 +2625,7 @@ void file_read_open(struct client_files *, struct tmuxpeer *, struct imsg *, void file_write_ready(struct client_files *, struct imsg *); void file_read_data(struct client_files *, struct imsg *); void file_read_done(struct client_files *, struct imsg *); +void file_read_cancel(struct client_files *, struct imsg *); /* server.c */ extern struct tmuxproc *server_proc; -- cgit From 483cc77c1cbc6898fef143c8100945139c14a92c Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 12 Jan 2023 18:49:11 +0000 Subject: Have tmux recognise pasted texts wrapped in bracket paste sequences, rather than only forwarding them to the program inside. From Andrew Onyshchuk in GitHub issue 3431. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index bb33b312..4df99d01 100644 --- a/tmux.h +++ b/tmux.h @@ -1811,6 +1811,7 @@ struct client { #define CLIENT_CONTROL_WAITEXIT 0x200000000ULL #define CLIENT_WINDOWSIZECHANGED 0x400000000ULL #define CLIENT_CLIPBOARDBUFFER 0x800000000ULL +#define CLIENT_BRACKETPASTING 0x1000000000ULL #define CLIENT_ALLREDRAWFLAGS \ (CLIENT_REDRAWWINDOW| \ CLIENT_REDRAWSTATUS| \ -- cgit From eb1f8d70a7d1fe4b0fe604d5a36fcbc2babef249 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 16 Jan 2023 11:26:14 +0000 Subject: Mark keys sent by command and skip paste handling for them. --- tmux.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 4df99d01..718a067b 100644 --- a/tmux.h +++ b/tmux.h @@ -131,13 +131,14 @@ struct winlink; #define KEYC_SHIFT 0x00400000000000ULL /* Key flag bits. */ -#define KEYC_LITERAL 0x01000000000000ULL -#define KEYC_KEYPAD 0x02000000000000ULL -#define KEYC_CURSOR 0x04000000000000ULL +#define KEYC_LITERAL 0x01000000000000ULL +#define KEYC_KEYPAD 0x02000000000000ULL +#define KEYC_CURSOR 0x04000000000000ULL #define KEYC_IMPLIED_META 0x08000000000000ULL #define KEYC_BUILD_MODIFIERS 0x10000000000000ULL -#define KEYC_VI 0x20000000000000ULL -#define KEYC_EXTENDED 0x40000000000000ULL +#define KEYC_VI 0x20000000000000ULL +#define KEYC_EXTENDED 0x40000000000000ULL +#define KEYC_SENT 0x80000000000000ULL /* Masks for key bits. */ #define KEYC_MASK_MODIFIERS 0x00f00000000000ULL -- cgit From 3aa458ea6398b0de37c3e146304bd2a4e17ea3c0 Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 20 Jan 2023 21:36:00 +0000 Subject: Add a flag to display-menu to select the manu item chosen first, GitHub issue 3442. --- tmux.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 718a067b..3b1a4fc9 100644 --- a/tmux.h +++ b/tmux.h @@ -3292,11 +3292,11 @@ void menu_add_item(struct menu *, const struct menu_item *, struct cmdq_item *, struct client *, struct cmd_find_state *); void menu_free(struct menu *); -struct menu_data *menu_prepare(struct menu *, int, struct cmdq_item *, u_int, - u_int, struct client *, struct cmd_find_state *, +struct menu_data *menu_prepare(struct menu *, int, int, struct cmdq_item *, + u_int, u_int, struct client *, struct cmd_find_state *, menu_choice_cb, void *); -int menu_display(struct menu *, int, struct cmdq_item *, u_int, - u_int, struct client *, struct cmd_find_state *, +int menu_display(struct menu *, int, int, struct cmdq_item *, + u_int, u_int, struct client *, struct cmd_find_state *, menu_choice_cb, void *); struct screen *menu_mode_cb(struct client *, void *, u_int *, u_int *); void menu_check_cb(struct client *, void *, u_int, u_int, u_int, -- cgit