From 4ca1de1b8bc10dca47d2cf7399df41845c902c9e Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 3 Jun 2019 18:28:37 +0000 Subject: Add new-session -X and attach-session -x to send SIGHUP to parent when detaching (like detach-client -P). From Colin Watson in GitHub issue 1773. --- tmux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 8eb1e65a..3849790c 100644 --- a/tmux.h +++ b/tmux.h @@ -2009,7 +2009,7 @@ extern const struct cmd_entry *cmd_table[]; /* cmd-attach-session.c */ enum cmd_retval cmd_attach_session(struct cmdq_item *, const char *, int, int, - const char *, int); + int, const char *, int); /* cmd-parse.c */ void cmd_parse_empty(struct cmd_parse_input *); -- cgit From 8f40796f05f2db0ff8b2c9231054b62b511a7ba0 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 5 Jun 2019 20:00:53 +0000 Subject: Add a -v flag to source-file to show the commands and line numbers. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 3849790c..f8ceb95d 100644 --- a/tmux.h +++ b/tmux.h @@ -1324,6 +1324,7 @@ struct cmd_parse_input { #define CMD_PARSE_QUIET 0x1 #define CMD_PARSE_PARSEONLY 0x2 #define CMD_PARSE_NOALIAS 0x4 +#define CMD_PARSE_VERBOSE 0x8 const char *file; u_int line; -- cgit From e37f34facc05c3ba146d4158cc7af23f6886fecd Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 7 Jun 2019 20:09:17 +0000 Subject: Do not load the config file if the server is exiting because it failed to start, otherwise commands like lsk which start the server again can end up looping infinitely. Also make the first client exit correctly. Problem reported by Wael M Nasreddine. --- tmux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index f8ceb95d..76bf8303 100644 --- a/tmux.h +++ b/tmux.h @@ -1490,7 +1490,7 @@ struct client { #define CLIENT_REPEAT 0x20 #define CLIENT_SUSPENDED 0x40 #define CLIENT_ATTACHED 0x80 -/* 0x100 unused */ +#define CLIENT_EXITED 0x100 #define CLIENT_DEAD 0x200 #define CLIENT_REDRAWBORDERS 0x400 #define CLIENT_READONLY 0x800 -- cgit From 3e72e98e3bdf3e814d6d20060247bb5f5dc859bb Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 13 Jun 2019 19:46:00 +0000 Subject: Add regular expression support for the format search, match and substitute modifiers. --- tmux.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 76bf8303..3324acba 100644 --- a/tmux.h +++ b/tmux.h @@ -2396,7 +2396,8 @@ void window_pane_key(struct window_pane *, struct client *, struct session *, struct winlink *, key_code, struct mouse_event *); int window_pane_visible(struct window_pane *); -u_int window_pane_search(struct window_pane *, const char *); +u_int window_pane_search(struct window_pane *, const char *, int, + int); const char *window_printable_flags(struct winlink *); struct window_pane *window_pane_find_up(struct window_pane *); struct window_pane *window_pane_find_down(struct window_pane *); @@ -2631,4 +2632,7 @@ int style_is_default(struct style *); struct winlink *spawn_window(struct spawn_context *, char **); struct window_pane *spawn_pane(struct spawn_context *, char **); +/* regsub.c */ +char *regsub(const char *, const char *, const char *, int); + #endif /* TMUX_H */ -- cgit From 9272fe36e2e36789342337d81914008826499941 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 18 Jun 2019 11:08:42 +0000 Subject: Add a cmdq_continue function rather than twiddling the flag directly. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 3324acba..cc5e55c0 100644 --- a/tmux.h +++ b/tmux.h @@ -2037,6 +2037,7 @@ void cmdq_insert_after(struct cmdq_item *, struct cmdq_item *); void cmdq_append(struct client *, struct cmdq_item *); void cmdq_insert_hook(struct session *, struct cmdq_item *, struct cmd_find_state *, const char *, ...); +void cmdq_continue(struct cmdq_item *); void printflike(3, 4) cmdq_format(struct cmdq_item *, const char *, const char *, ...); u_int cmdq_next(struct client *); -- cgit From c1ede507d954b98a73c40665e7aee6fe5f0c5bce Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 20 Jun 2019 07:41:29 +0000 Subject: Add a helper function to work out option table from name. --- tmux.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index cc5e55c0..0557e98d 100644 --- a/tmux.h +++ b/tmux.h @@ -1819,6 +1819,9 @@ struct options_entry *options_set_number(struct options *, const char *, long long); struct options_entry *options_set_style(struct options *, const char *, int, const char *); +enum options_table_scope options_scope_from_name(struct args *, int, + const char *, struct cmd_find_state *, struct options **, + char **); enum options_table_scope options_scope_from_flags(struct args *, int, struct cmd_find_state *, struct options **, char **); -- cgit From 5f92f92908b81b4ec66682adb84b9ffc8d83c2f7 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 20 Jun 2019 11:59:59 +0000 Subject: Add a per-pane option set. Pane options inherit from window options (so there should be no change to existing behaviour) and are set and shown with set-option -p and show-options -p. Change remain-on-exit and window-style/window-active-style to be pane options (some others will be changed later). This makes select-pane -P and -g unnecessary so no longer document them (they still work) and no longer document set-window-option and show-window-options in favour of set-option -w and show-options -w. --- tmux.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 0557e98d..8adfcba8 100644 --- a/tmux.h +++ b/tmux.h @@ -810,6 +810,7 @@ struct window_pane { u_int active_point; struct window *window; + struct options *options; struct layout_cell *layout_cell; struct layout_cell *saved_layout_cell; @@ -836,6 +837,7 @@ struct window_pane { #define PANE_STATUSREADY 0x200 #define PANE_STATUSDRAWN 0x400 #define PANE_EMPTY 0x800 +#define PANE_STYLECHANGED 0x1000 int argc; char **argv; @@ -854,7 +856,8 @@ struct window_pane { struct input_ctx *ictx; - struct style style; + struct style cached_style; + struct style cached_active_style; int *palette; int pipe_fd; @@ -914,7 +917,6 @@ struct window { #define WINDOW_ACTIVITY 0x2 #define WINDOW_SILENCE 0x4 #define WINDOW_ZOOMED 0x8 -#define WINDOW_STYLECHANGED 0x10 #define WINDOW_ALERTFLAGS (WINDOW_BELL|WINDOW_ACTIVITY|WINDOW_SILENCE) int alerts_queued; @@ -922,9 +924,6 @@ struct window { struct options *options; - struct style style; - struct style active_style; - u_int references; TAILQ_HEAD(, winlink) winlinks; @@ -1605,12 +1604,11 @@ enum options_table_type { OPTIONS_TABLE_COMMAND }; -enum options_table_scope { - OPTIONS_TABLE_NONE, - OPTIONS_TABLE_SERVER, - OPTIONS_TABLE_SESSION, - OPTIONS_TABLE_WINDOW -}; +#define OPTIONS_TABLE_NONE 0 +#define OPTIONS_TABLE_SERVER 0x1 +#define OPTIONS_TABLE_SESSION 0x2 +#define OPTIONS_TABLE_WINDOW 0x4 +#define OPTIONS_TABLE_PANE 0x8 #define OPTIONS_TABLE_IS_ARRAY 0x1 #define OPTIONS_TABLE_IS_HOOK 0x2 @@ -1618,7 +1616,7 @@ enum options_table_scope { struct options_table_entry { const char *name; enum options_table_type type; - enum options_table_scope scope; + int scope; int flags; u_int minimum; @@ -1780,6 +1778,7 @@ void notify_pane(const char *, struct window_pane *); /* options.c */ struct options *options_create(struct options *); void options_free(struct options *); +void options_set_parent(struct options *, struct options *); struct options_entry *options_first(struct options *); struct options_entry *options_next(struct options_entry *); struct options_entry *options_empty(struct options *, @@ -1819,10 +1818,10 @@ struct options_entry *options_set_number(struct options *, const char *, long long); struct options_entry *options_set_style(struct options *, const char *, int, const char *); -enum options_table_scope options_scope_from_name(struct args *, int, +int options_scope_from_name(struct args *, int, const char *, struct cmd_find_state *, struct options **, char **); -enum options_table_scope options_scope_from_flags(struct args *, int, +int options_scope_from_flags(struct args *, int, struct cmd_find_state *, struct options **, char **); /* options-table.c */ -- cgit From d83f356218fc9144735667e39c9553bcf905d10b Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 26 Jun 2019 13:03:47 +0000 Subject: Add #define for the pane status line option position numbers. --- tmux.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 8adfcba8..ba257ea8 100644 --- a/tmux.h +++ b/tmux.h @@ -955,6 +955,11 @@ TAILQ_HEAD(winlink_stack, winlink); #define WINDOW_SIZE_SMALLEST 1 #define WINDOW_SIZE_MANUAL 2 +/* Pane border status option. */ +#define PANE_STATUS_OFF 0 +#define PANE_STATUS_TOP 1 +#define PANE_STATUS_BOTTOM 2 + /* Layout direction. */ enum layout_type { LAYOUT_LEFTRIGHT, -- cgit From dae2868d1227b95fd076fb4a5efa6256c7245943 Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 27 Jun 2019 15:17:41 +0000 Subject: Add support for underscore colours with Setulc capability, mostly from Kai Moschcau. --- tmux.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index ba257ea8..7126b30f 100644 --- a/tmux.h +++ b/tmux.h @@ -427,6 +427,7 @@ enum tty_code_code { TTYC_SETAF, TTYC_SETRGBB, TTYC_SETRGBF, + TTYC_SETULC, TTYC_SGR0, TTYC_SITM, TTYC_SMACS, @@ -599,6 +600,7 @@ struct grid_cell { u_short attr; int fg; int bg; + int us; struct utf8_data data; }; struct grid_cell_entry { @@ -2194,7 +2196,8 @@ int colour_join_rgb(u_char, u_char, u_char); void colour_split_rgb(int, u_char *, u_char *, u_char *); const char *colour_tostring(int); int colour_fromstring(const char *s); -u_char colour_256to16(u_char); +int colour_256toRGB(int); +int colour_256to16(int); /* attributes.c */ const char *attributes_tostring(int); -- cgit From cf30e0f9357b7e42491645a87eeae06ffb8e8066 Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 30 Jun 2019 19:21:53 +0000 Subject: Do not double free window if pane fails to start. --- tmux.h | 1 - 1 file changed, 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 7126b30f..d6dacf63 100644 --- a/tmux.h +++ b/tmux.h @@ -2362,7 +2362,6 @@ struct window *window_find_by_id_str(const char *); struct window *window_find_by_id(u_int); void window_update_activity(struct window *); struct window *window_create(u_int, u_int); -void window_destroy(struct window *); void window_pane_set_event(struct window_pane *); struct window_pane *window_get_active_at(struct window *, u_int, u_int); struct window_pane *window_find_string(struct window *, const char *); -- cgit From 2da050413c17e587be8bede710112096ce6b5f5a Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 1 Jul 2019 06:56:00 +0000 Subject: Add a "fill" style attribute to clear the entire format drawing area in a colour, GitHub issue 1815. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index d6dacf63..e43140b2 100644 --- a/tmux.h +++ b/tmux.h @@ -682,6 +682,7 @@ TAILQ_HEAD(style_ranges, style_range); struct style { struct grid_cell gc; + int fill; enum style_align align; enum style_list list; -- cgit From 3635b3cd6c3343b2ec3f7173facef8a284e7e613 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 6 Jul 2019 20:37:29 +0000 Subject: Correctly clear underscore colour in grid_get_cell1, also fix struct grid_cell to avoid padding. Fixes increased memory use reported by Suraj N Kurapati. --- tmux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index e43140b2..0b0d998e 100644 --- a/tmux.h +++ b/tmux.h @@ -596,13 +596,13 @@ enum utf8_state { /* Grid cell data. */ struct grid_cell { - u_char flags; + struct utf8_data data; /* 21 bytes */ u_short attr; + u_char flags; int fg; int bg; int us; - struct utf8_data data; -}; +} __packed; struct grid_cell_entry { u_char flags; union { -- cgit From fc2016dbb665f01e795a89632a1bb74294bfc4e1 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 9 Jul 2019 14:03:12 +0000 Subject: Add a -H flag to send-keys to send literal keys given as hex numbers (needed for control clients to send mouse sequences). Also add some format flags for UTF-8 and SGR mouse mode. Requested by Bradley Smith in GitHub issues 1832 and 1833. --- tmux.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 0b0d998e..fdb0a7c7 100644 --- a/tmux.h +++ b/tmux.h @@ -111,9 +111,10 @@ struct winlink; #define KEYC_CTRL 0x400000000000ULL #define KEYC_SHIFT 0x800000000000ULL #define KEYC_XTERM 0x1000000000000ULL +#define KEYC_LITERAL 0x2000000000000ULL /* Mask to obtain key w/o modifiers. */ -#define KEYC_MASK_MOD (KEYC_ESCAPE|KEYC_CTRL|KEYC_SHIFT|KEYC_XTERM) +#define KEYC_MASK_MOD (KEYC_ESCAPE|KEYC_CTRL|KEYC_SHIFT|KEYC_XTERM|KEYC_LITERAL) #define KEYC_MASK_KEY (~KEYC_MASK_MOD) /* Is this a mouse key? */ -- cgit From f4d858e7a0888cfd1d09c421f71729e833322851 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 10 Jul 2019 11:20:10 +0000 Subject: Add -F to refresh-client to specify flags for control clients - one flag at the moment, no-output which turns off forwarding pane output. From Thomas Adam. GitHub issue 1834. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index fdb0a7c7..b09b52a8 100644 --- a/tmux.h +++ b/tmux.h @@ -1516,6 +1516,7 @@ struct client { #define CLIENT_STATUSOFF 0x800000 #define CLIENT_REDRAWSTATUSALWAYS 0x1000000 #define CLIENT_REDRAWOVERLAY 0x2000000 +#define CLIENT_CONTROL_NOOUTPUT 0x4000000 #define CLIENT_ALLREDRAWFLAGS \ (CLIENT_REDRAWWINDOW| \ CLIENT_REDRAWSTATUS| \ -- cgit From 6ceeceab7adfb7b6a779df52f811f010aae0721c Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 15 Jul 2019 18:25:07 +0000 Subject: Make layout_fix_offsets take a window like layout_fix_panes. --- tmux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index b09b52a8..076a5fe6 100644 --- a/tmux.h +++ b/tmux.h @@ -2438,7 +2438,7 @@ void layout_set_size(struct layout_cell *, u_int, u_int, u_int, u_int); void layout_make_leaf(struct layout_cell *, struct window_pane *); void layout_make_node(struct layout_cell *, enum layout_type); -void layout_fix_offsets(struct layout_cell *); +void layout_fix_offsets(struct window *); void layout_fix_panes(struct window *); void layout_resize_adjust(struct window *, struct layout_cell *, enum layout_type, int); -- cgit