From f1828921dfed4b7f2ba38b8c4a370b42965c404c Mon Sep 17 00:00:00 2001 From: nicm Date: Sun, 23 Feb 2014 00:53:06 +0000 Subject: Change terminal-overrides to a server option (now that we have them), it doesn't make much sense as a session option. --- tmux.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index c6919622..5801b35e 100644 --- a/tmux.h +++ b/tmux.h @@ -1650,7 +1650,7 @@ void tty_set_title(struct tty *, const char *); void tty_update_mode(struct tty *, int, struct screen *); void tty_force_cursor_colour(struct tty *, const char *); void tty_draw_line(struct tty *, struct screen *, u_int, u_int, u_int); -int tty_open(struct tty *, const char *, char **); +int tty_open(struct tty *, char **); void tty_close(struct tty *); void tty_free(struct tty *); void tty_write( @@ -1679,7 +1679,7 @@ void tty_bell(struct tty *); /* tty-term.c */ extern struct tty_terms tty_terms; extern const struct tty_term_code_entry tty_term_codes[NTTYCODE]; -struct tty_term *tty_term_find(char *, int, const char *, char **); +struct tty_term *tty_term_find(char *, int, char **); void tty_term_free(struct tty_term *); int tty_term_has(struct tty_term *, enum tty_code_code); const char *tty_term_string(struct tty_term *, enum tty_code_code); @@ -1893,7 +1893,7 @@ void server_add_accept(int); /* server-client.c */ void server_client_handle_key(struct client *, int); void server_client_create(int); -int server_client_open(struct client *, struct session *, char **); +int server_client_open(struct client *, char **); void server_client_lost(struct client *); void server_client_callback(int, short, void *); void server_client_status_timer(void); -- cgit From 175f215187b1c978ca4cc4988a78d067122e2b0c Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 31 Mar 2014 21:34:08 +0000 Subject: Having three *clock* files is ridiculous, remove clock.c. --- tmux.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 5801b35e..9900489e 100644 --- a/tmux.h +++ b/tmux.h @@ -1713,10 +1713,6 @@ char *paste_print(struct paste_buffer *, size_t); void paste_send_pane(struct paste_buffer *, struct window_pane *, const char *, int); -/* clock.c */ -extern const char clock_table[14][5][5]; -void clock_draw(struct screen_write_ctx *, int, int); - /* arguments.c */ int args_cmp(struct args_entry *, struct args_entry *); RB_PROTOTYPE(args_tree, args_entry, entry, args_cmp); @@ -2222,6 +2218,7 @@ void layout_set_active_changed(struct window *); /* window-clock.c */ extern const struct window_mode window_clock_mode; +extern const char window_clock_table[14][5][5]; /* window-copy.c */ extern const struct window_mode window_copy_mode; -- cgit From 9368914ee782f6ea9d7ea8f6b28b9d87ffae8023 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 31 Mar 2014 21:36:43 +0000 Subject: Add start-of-list, end-of-list, top-line and bottom-line in choice mode, from madmaverick9 at roxxmail dot eu, similar diff a few days later from Marcel Partap. --- tmux.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 9900489e..3a73dece 100644 --- a/tmux.h +++ b/tmux.h @@ -520,14 +520,18 @@ enum mode_key_cmd { /* Menu (choice) keys. */ MODEKEYCHOICE_BACKSPACE, + MODEKEYCHOICE_BOTTOMLINE, MODEKEYCHOICE_CANCEL, MODEKEYCHOICE_CHOOSE, MODEKEYCHOICE_DOWN, + MODEKEYCHOICE_ENDOFLIST, MODEKEYCHOICE_PAGEDOWN, MODEKEYCHOICE_PAGEUP, MODEKEYCHOICE_SCROLLDOWN, MODEKEYCHOICE_SCROLLUP, MODEKEYCHOICE_STARTNUMBERPREFIX, + MODEKEYCHOICE_STARTOFLIST, + MODEKEYCHOICE_TOPLINE, MODEKEYCHOICE_TREE_COLLAPSE, MODEKEYCHOICE_TREE_COLLAPSE_ALL, MODEKEYCHOICE_TREE_EXPAND, -- cgit From b11de5adc7a89a23af2a778d4de12ac697c902a0 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 31 Mar 2014 21:37:55 +0000 Subject: Make session_attached a count and add session_many_attached flag. --- tmux.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 3a73dece..fe4a697b 100644 --- a/tmux.h +++ b/tmux.h @@ -1086,6 +1086,8 @@ struct session { #define SESSION_UNATTACHED 0x1 /* not attached to any clients */ int flags; + u_int attached; + struct termios *tio; struct environ environ; -- cgit From 0e4d1d8493564ce908b002d8e9dddc105184039e Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 31 Mar 2014 21:39:31 +0000 Subject: Add setb -a to append and a copy mode append command, from J Raynor with minor changes. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index fe4a697b..b30f2080 100644 --- a/tmux.h +++ b/tmux.h @@ -540,6 +540,7 @@ enum mode_key_cmd { MODEKEYCHOICE_UP, /* Copy keys. */ + MODEKEYCOPY_APPENDSELECTION, MODEKEYCOPY_BACKTOINDENTATION, MODEKEYCOPY_BOTTOMLINE, MODEKEYCOPY_CANCEL, -- cgit From fcdae6925a08dc06860f9552ba7a300669f4a038 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 31 Mar 2014 21:39:59 +0000 Subject: Use hex constants rather than shifts for mouse events and flags, pointed out by Marcel Partap. --- tmux.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index b30f2080..b7d53727 100644 --- a/tmux.h +++ b/tmux.h @@ -1133,14 +1133,14 @@ LIST_HEAD(tty_terms, tty_term); #define MOUSE_WHEEL_DOWN 1 /* Mouse events. */ -#define MOUSE_EVENT_DOWN (1 << 0) -#define MOUSE_EVENT_DRAG (1 << 1) -#define MOUSE_EVENT_UP (1 << 2) -#define MOUSE_EVENT_CLICK (1 << 3) -#define MOUSE_EVENT_WHEEL (1 << 4) +#define MOUSE_EVENT_DOWN 0x1 +#define MOUSE_EVENT_DRAG 0x2 +#define MOUSE_EVENT_UP 0x4 +#define MOUSE_EVENT_CLICK 0x8 +#define MOUSE_EVENT_WHEEL 0x10 /* Mouse flags. */ -#define MOUSE_RESIZE_PANE (1 << 0) +#define MOUSE_RESIZE_PANE 0x1 /* * Mouse input. When sent by xterm: -- cgit From 46593e7aa26b83f0ba1b0d36a700d7158ac2b178 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 31 Mar 2014 21:40:21 +0000 Subject: Add names for mouse button bits rather than using magic numbers, from Marcel Partap. --- tmux.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index b7d53727..94eb5b8f 100644 --- a/tmux.h +++ b/tmux.h @@ -1128,18 +1128,26 @@ struct tty_term { }; LIST_HEAD(tty_terms, tty_term); +/* Mouse button masks. */ +#define MOUSE_MASK_BUTTONS 3 +#define MOUSE_MASK_SHIFT 4 +#define MOUSE_MASK_META 8 +#define MOUSE_MASK_CTRL 16 +#define MOUSE_MASK_DRAG 32 +#define MOUSE_MASK_WHEEL 64 + /* Mouse wheel states. */ #define MOUSE_WHEEL_UP 0 #define MOUSE_WHEEL_DOWN 1 -/* Mouse events. */ +/* Mouse event bits. */ #define MOUSE_EVENT_DOWN 0x1 #define MOUSE_EVENT_DRAG 0x2 #define MOUSE_EVENT_UP 0x4 #define MOUSE_EVENT_CLICK 0x8 #define MOUSE_EVENT_WHEEL 0x10 -/* Mouse flags. */ +/* Mouse flag bits. */ #define MOUSE_RESIZE_PANE 0x1 /* -- cgit From f155316be7f24d76dd8fe6eb3dd34c5cf0aae86d Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 31 Mar 2014 21:42:05 +0000 Subject: Remove unused log functions. --- tmux.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 94eb5b8f..9990ccfe 100644 --- a/tmux.h +++ b/tmux.h @@ -2343,9 +2343,6 @@ char *get_proc_name(int, char *); /* log.c */ void log_open(int, const char *); void log_close(void); -void printflike1 log_warn(const char *, ...); -void printflike1 log_warnx(const char *, ...); -void printflike1 log_info(const char *, ...); void printflike1 log_debug(const char *, ...); void printflike1 log_debug2(const char *, ...); __dead void printflike1 log_fatal(const char *, ...); -- cgit From 7bdb675469336e1c8c7c5039aff369f8245dc450 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 31 Mar 2014 21:42:27 +0000 Subject: GRID_DEBUG is no longer needed. --- tmux.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 9990ccfe..df7b5d16 100644 --- a/tmux.h +++ b/tmux.h @@ -663,16 +663,6 @@ struct utf8_data { u_int width; }; -/* Grid output. */ -#if defined(DEBUG) && \ - ((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ - (defined(__GNUC__) && __GNUC__ >= 3)) -#define GRID_DEBUG(gd, fmt, ...) log_debug2("%s: (sx=%u, sy=%u, hsize=%u) " \ - fmt, __func__, (gd)->sx, (gd)->sy, (gd)->hsize, ## __VA_ARGS__) -#else -#define GRID_DEBUG(...) -#endif - /* Grid attributes. */ #define GRID_ATTR_BRIGHT 0x1 #define GRID_ATTR_DIM 0x2 -- cgit From d9960b2d4d4cb6697086d32b24e9e6cbc74df483 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 1 Apr 2014 05:50:30 +0000 Subject: missed commit matching log.c --- tmux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index df7b5d16..6b35e175 100644 --- a/tmux.h +++ b/tmux.h @@ -2331,7 +2331,7 @@ u_int utf8_split2(u_int, u_char *); char *get_proc_name(int, char *); /* log.c */ -void log_open(int, const char *); +void log_open(const char *); void log_close(void); void printflike1 log_debug(const char *, ...); void printflike1 log_debug2(const char *, ...); -- cgit From 252a7373d69646ae866e3a4fa18d46f673864c0e Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 2 Apr 2014 18:12:18 +0000 Subject: Support UTF-8 with choose-buffer, from Kosuke ASAMI. Also make buffer_sample bigger to let it trim at window right edge. --- tmux.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 6b35e175..7e541458 100644 --- a/tmux.h +++ b/tmux.h @@ -85,7 +85,7 @@ extern char **environ; /* Default template for choose-buffer. */ #define CHOOSE_BUFFER_TEMPLATE \ - "#{line}: #{buffer_size} bytes: \"#{buffer_sample}\"" + "#{line}: #{buffer_size} bytes: #{buffer_sample}" /* Default template for choose-client. */ #define CHOOSE_CLIENT_TEMPLATE \ @@ -1544,7 +1544,7 @@ void format_winlink(struct format_tree *, struct session *, void format_window_pane(struct format_tree *, struct window_pane *); void format_paste_buffer(struct format_tree *, - struct paste_buffer *); + struct paste_buffer *, int); /* mode-key.c */ extern const struct mode_key_table mode_key_tables[]; @@ -1714,7 +1714,7 @@ int paste_free_top(struct paste_stack *); int paste_free_index(struct paste_stack *, u_int); void paste_add(struct paste_stack *, char *, size_t, u_int); int paste_replace(struct paste_stack *, u_int, char *, size_t); -char *paste_print(struct paste_buffer *, size_t); +char *paste_make_sample(struct paste_buffer *, int); void paste_send_pane(struct paste_buffer *, struct window_pane *, const char *, int); @@ -2326,6 +2326,7 @@ int utf8_open(struct utf8_data *, u_char); int utf8_append(struct utf8_data *, u_char); u_int utf8_combine(const struct utf8_data *); u_int utf8_split2(u_int, u_char *); +int utf8_strvis(char *, const char *, size_t, int); /* procname.c */ char *get_proc_name(int, char *); -- cgit From acef311fe356f408690e9f94727ed63a934b742f Mon Sep 17 00:00:00 2001 From: nicm Date: Thu, 3 Apr 2014 08:20:29 +0000 Subject: Work out mouse scroll wheel effect when the mouse is first detected and store it in struct mouse_event, reduce the scroll size the 3 but allow shift to reduce it to 1 and meta and ctrl to multiply by 3 if the terminal supports them, also support wheel in choose mode. From Marcel Partap. --- tmux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmux.h') diff --git a/tmux.h b/tmux.h index 7e541458..a9edf8ff 100644 --- a/tmux.h +++ b/tmux.h @@ -1168,6 +1168,7 @@ struct mouse_event { u_int button; u_int clicks; + u_int scroll; int wheel; int event; -- cgit