diff --git a/CHANGES b/CHANGES index 7b352f56..051c8e05 100644 --- a/CHANGES +++ b/CHANGES @@ -59,6 +59,20 @@ CHANGES FROM 3.0 to X.X * Add reverse sorting in tree, client and buffer modes. +CHANGES FROM 3.0 to 3.0a + +* Do not require REG_STARTEND. + +* Respawn panes or windows correctly if default-command is set. + +* Add missing option for after-kill-pane hook. + +* Fix for crash with a format variable that doesn't exist. + +* Do not truncate list-keys output on some platforms. + +* Do not crash when restoring a layout with only one pane. + CHANGES FROM 2.9 to 3.0 * Workaround invalid layout strings generated by older tmux versions and add @@ -149,7 +163,7 @@ CHANGES FROM 2.9 to 3.0 * Add the ability to create simple menus. Introduces new command display-menu. Default menus are bound to MouseDown3 on the status line; MouseDown3 or M-MouseDown3 on panes; MouseDown3 in tree, client and - buffer modes; and C-b C-m and C-b M-m. + buffer modes; and C-b < and >. * Allow panes to be empty (no command). They can be created either by piping to split-window -I, or by passing an empty command ('') to split-window. Output diff --git a/attributes.c b/attributes.c index 5849af2b..ca88a056 100644 --- a/attributes.c +++ b/attributes.c @@ -59,8 +59,8 @@ attributes_fromstring(const char *str) size_t end; u_int i; struct { - const char* name; - int attr; + const char *name; + int attr; } table[] = { { "bright", GRID_ATTR_BRIGHT }, { "bold", GRID_ATTR_BRIGHT }, diff --git a/compat.h b/compat.h index d3617413..df1ac03c 100644 --- a/compat.h +++ b/compat.h @@ -61,12 +61,31 @@ void warn(const char *, ...); void warnx(const char *, ...); #endif -#ifndef HAVE_PATHS_H -#define _PATH_BSHELL "/bin/sh" -#define _PATH_TMP "/tmp/" +#ifdef HAVE_PATHS_H +#include +#endif + +#ifndef _PATH_BSHELL +#define _PATH_BSHELL "/bin/sh" +#endif + +#ifndef _PATH_TMP +#define _PATH_TMP "/tmp/" +#endif + +#ifndef _PATH_DEVNULL #define _PATH_DEVNULL "/dev/null" +#endif + +#ifndef _PATH_TTY #define _PATH_TTY "/dev/tty" +#endif + +#ifndef _PATH_DEV #define _PATH_DEV "/dev/" +#endif + +#ifndef _PATH_DEFPATH #define _PATH_DEFPATH "/usr/bin:/bin" #endif @@ -98,10 +117,6 @@ void warnx(const char *, ...); #include "compat/bitstring.h" #endif -#ifdef HAVE_PATHS_H -#include -#endif - #ifdef HAVE_LIBUTIL_H #include #endif diff --git a/grid.c b/grid.c index a016dc12..b2031045 100644 --- a/grid.c +++ b/grid.c @@ -204,7 +204,7 @@ grid_clear_cell(struct grid *gd, u_int px, u_int py, u_int bg) /* Check grid y position. */ static int -grid_check_y(struct grid *gd, const char* from, u_int py) +grid_check_y(struct grid *gd, const char *from, u_int py) { if (py >= gd->hsize + gd->sy) { log_debug("%s: y out of range: %u", from, py); diff --git a/key-bindings.c b/key-bindings.c index 175af8f4..d4fada6a 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -24,12 +24,6 @@ #include "tmux.h" -#define DEFAULT_CLIENT_MENU \ - " 'Detach' 'd' {detach-client}" \ - " 'Detach & Kill' 'X' {detach-client -P}" \ - " 'Detach Others' 'o' {detach-client -a}" \ - " ''" \ - " 'Lock' 'l' {lock-client}" #define DEFAULT_SESSION_MENU \ " 'Next' 'n' {switch-client -n}" \ " 'Previous' 'p' {switch-client -p}" \ @@ -325,7 +319,6 @@ key_bindings_init(void) "bind -n MouseDrag1Pane if -Ft= '#{mouse_any_flag}' 'if -Ft= \"#{pane_in_mode}\" \"copy-mode -M\" \"send-keys -M\"' 'copy-mode -M'", "bind -n WheelUpPane if -Ft= '#{mouse_any_flag}' 'send-keys -M' 'if -Ft= \"#{pane_in_mode}\" \"send-keys -M\" \"copy-mode -et=\"'", - "bind -n MouseDown3StatusRight display-menu -t= -xM -yS -T \"#[align=centre]#{client_name}\" " DEFAULT_CLIENT_MENU, "bind -n MouseDown3StatusLeft display-menu -t= -xM -yS -T \"#[align=centre]#{session_name}\" " DEFAULT_SESSION_MENU, "bind -n MouseDown3Status display-menu -t= -xW -yS -T \"#[align=centre]#{window_index}:#{window_name}\" " DEFAULT_WINDOW_MENU, "bind < display-menu -xW -yS -T \"#[align=centre]#{window_index}:#{window_name}\" " DEFAULT_WINDOW_MENU, diff --git a/options.c b/options.c index 6bc54ef8..7402b724 100644 --- a/options.c +++ b/options.c @@ -610,7 +610,7 @@ options_match(const char *s, int *idx, int *ambiguous) struct options_entry * options_match_get(struct options *oo, const char *s, int *idx, int only, - int* ambiguous) + int *ambiguous) { char *name; struct options_entry *o; diff --git a/server-client.c b/server-client.c index 075b0ba1..9a24ca39 100644 --- a/server-client.c +++ b/server-client.c @@ -1579,7 +1579,7 @@ server_client_check_exit(struct client *c) /* Redraw timer callback. */ static void server_client_redraw_timer(__unused int fd, __unused short events, - __unused void* data) + __unused void *data) { log_debug("redraw timer fired"); } diff --git a/window-buffer.c b/window-buffer.c index 5c897341..0412dc97 100644 --- a/window-buffer.c +++ b/window-buffer.c @@ -333,7 +333,7 @@ window_buffer_resize(struct window_mode_entry *wme, u_int sx, u_int sy) } static void -window_buffer_do_delete(void* modedata, void *itemdata, +window_buffer_do_delete(void *modedata, void *itemdata, __unused struct client *c, __unused key_code key) { struct window_buffer_modedata *data = modedata; @@ -347,7 +347,7 @@ window_buffer_do_delete(void* modedata, void *itemdata, } static void -window_buffer_do_paste(void* modedata, void *itemdata, struct client *c, +window_buffer_do_paste(void *modedata, void *itemdata, struct client *c, __unused key_code key) { struct window_buffer_modedata *data = modedata; diff --git a/window-client.c b/window-client.c index 2ca9c012..22a0f2e2 100644 --- a/window-client.c +++ b/window-client.c @@ -313,7 +313,7 @@ window_client_resize(struct window_mode_entry *wme, u_int sx, u_int sy) } static void -window_client_do_detach(void* modedata, void *itemdata, +window_client_do_detach(void *modedata, void *itemdata, __unused struct client *c, key_code key) { struct window_client_modedata *data = modedata; diff --git a/window-tree.c b/window-tree.c index 4f4cbaab..7ba14054 100644 --- a/window-tree.c +++ b/window-tree.c @@ -317,7 +317,7 @@ window_tree_filter_pane(struct session *s, struct winlink *wl, static int window_tree_build_window(struct session *s, struct winlink *wl, - void* modedata, struct mode_tree_sort_criteria *sort_crit, + void *modedata, struct mode_tree_sort_criteria *sort_crit, struct mode_tree_item *parent, const char *filter) { struct window_tree_modedata *data = modedata; @@ -383,7 +383,7 @@ empty: } static void -window_tree_build_session(struct session *s, void* modedata, +window_tree_build_session(struct session *s, void *modedata, struct mode_tree_sort_criteria *sort_crit, const char *filter) { struct window_tree_modedata *data = modedata; @@ -973,7 +973,7 @@ window_tree_get_target(struct window_tree_itemdata *item, } static void -window_tree_command_each(void* modedata, void* itemdata, struct client *c, +window_tree_command_each(void *modedata, void *itemdata, struct client *c, __unused key_code key) { struct window_tree_modedata *data = modedata; @@ -1030,7 +1030,7 @@ window_tree_command_free(void *modedata) } static void -window_tree_kill_each(__unused void* modedata, void* itemdata, +window_tree_kill_each(__unused void *modedata, void *itemdata, __unused struct client *c, __unused key_code key) { struct window_tree_itemdata *item = itemdata;