From 1e981f4c6d429f5c51cb0d7a5c40fcd78ad236a2 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 17 Feb 2014 18:12:47 +0000 Subject: [PATCH 1/6] Don't crash when given a invalid colour, reported by Felix Rosencrantz, fix from Thomas Adam. --- cmd-set-option.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd-set-option.c b/cmd-set-option.c index 046bebd6..9882e449 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -307,11 +307,13 @@ cmd_set_option_set(struct cmd *self, struct cmd_q *cmdq, break; case OPTIONS_TABLE_COLOUR: o = cmd_set_option_colour(self, cmdq, oe, oo, value); - style_update_new(oo, o->name, oe->style); + if (o != NULL) + style_update_new(oo, o->name, oe->style); break; case OPTIONS_TABLE_ATTRIBUTES: o = cmd_set_option_attributes(self, cmdq, oe, oo, value); - style_update_new(oo, o->name, oe->style); + if (o != NULL) + style_update_new(oo, o->name, oe->style); break; case OPTIONS_TABLE_FLAG: o = cmd_set_option_flag(self, cmdq, oe, oo, value); From 69b7c496accc2a646e5e2dee7870bea1194a6641 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 17 Feb 2014 22:42:20 +0000 Subject: [PATCH 2/6] Be consistent and allow only mouse down and mouse wheel for any pane with mouse-select-pane rather than just in copy mode, reported by Balazs Kezes. --- server-client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-client.c b/server-client.c index c2903a0d..ed8159f5 100644 --- a/server-client.c +++ b/server-client.c @@ -324,9 +324,9 @@ server_client_check_mouse(struct client *c, struct window_pane *wp) else if (statusat > 0 && m->y >= (u_int)statusat) m->y = statusat - 1; - /* Is this a pane selection? Allow down only in copy mode. */ + /* Is this a pane selection? */ if (options_get_number(oo, "mouse-select-pane") && - (m->event == MOUSE_EVENT_DOWN || wp->mode != &window_copy_mode)) { + (m->event == MOUSE_EVENT_DOWN || m->event == MOUSE_EVENT_WHEEL)) { window_set_active_at(wp->window, m->x, m->y); server_redraw_window_borders(wp->window); wp = wp->window->active; /* may have changed */ From 6daf06b1ad61f67e9f7780d787451b9b5f82dd43 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 17 Feb 2014 23:07:03 +0000 Subject: [PATCH 3/6] Fix memory leaks with paste_replace, based on changes from J Raynor. --- cmd-load-buffer.c | 1 + paste.c | 4 +++- window-copy.c | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c index eb6e0d0c..636f0fcd 100644 --- a/cmd-load-buffer.c +++ b/cmd-load-buffer.c @@ -169,6 +169,7 @@ cmd_load_buffer_callback(struct client *c, int closed, void *data) /* No context so can't use server_client_msg_error. */ evbuffer_add_printf(c->stderr_data, "no buffer %d\n", *buffer); server_push_stderr(c); + free(pdata); } free(data); diff --git a/paste.c b/paste.c index 2e89a5ef..946935a3 100644 --- a/paste.c +++ b/paste.c @@ -131,8 +131,10 @@ paste_replace(struct paste_stack *ps, u_int idx, char *data, size_t size) { struct paste_buffer *pb; - if (size == 0) + if (size == 0) { + free(data); return (0); + } if (idx >= ARRAY_LENGTH(ps)) return (-1); diff --git a/window-copy.c b/window-copy.c index df4ca55a..76c9c3ce 100644 --- a/window-copy.c +++ b/window-copy.c @@ -1455,8 +1455,8 @@ window_copy_copy_buffer(struct window_pane *wp, int idx, void *buf, size_t len) if (idx == -1) { limit = options_get_number(&global_options, "buffer-limit"); paste_add(&global_buffers, buf, len, limit); - } else - paste_replace(&global_buffers, idx, buf, len); + } else if (paste_replace(&global_buffers, idx, buf, len) != 0) + free(buf); } void From c5d2de7ec0935b77dc620dfb95a1cf03d53d1aaa Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Thu, 20 Feb 2014 21:32:42 +0000 Subject: [PATCH 4/6] Update CHANGES and configure.ac for 1.9 release --- CHANGES | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b9ad4e69..17d4d2a8 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,58 @@ +CHANGES FROM 1.8 to 1.9, 20 February 2014 + +NOTE: This release has bumped the tmux protocol version. It is therefore +advised that the prior tmux server is restarted when this version of tmux is +installed, to avoid protocol mismatch errors for newer clients trying to +talk to an older running tmux server. + +Incompatible Changes +==================== + +* 88 colour support has been removed. +* 'default-path' has been removed. The new-window command accepts '-c' to + cater for this. The previous value of "." can be replaced with: 'neww -c + $PWD', the previous value of '' which meant current path of the pane can + be specified as: 'neww -c "#{pane_current_path}"' + +Deprecated Changes +================== + +* The single format specifiers: #A -> #Z (where defined) have been + deprecated and replaced with longer-named equivalents, as listed in the + FORMATS section of the tmux manpage. +* The various foo-{fg,bg,attr} commands have been deprecated and replaced + with equivalent foo-style option instead. Currently this is still + backwards-compatible, but will be removed over time. + +Normal Changes +============== + +* A new environment variable TMUX_TMPDIR is now honoured, allowing the + socket directory to be set outside of TMPDIR (/tmp/ if not set). +* If -s not given to swap-pane the current pane is assumed. +* A #{pane_syncronized} format specifier has been added to be a conditional + format if a pane is in a syncronised mode (c.f. syncronize-panes) +* Tmux now runs under Cygwin natively. +* Formats can now be nested within each other and expanded accordingly. +* Added 'automatic-rename-format' option to allow the automatic rename + mechanism to use something other than the default of + #{pane_current_command}. +* new-session learnt '-c' to specify the starting directory for that session + and all subsequent windows therein. +* The session name is now shown in the message printed to the terminal when + a session is detached. +* Lots more format specifiers have been added. +* Server race conditions have been fixed; in particular commands are not run + until after the configuration file is read completely. +* Case insensitive searching in tmux's copy-mode is now possible. +* attach-session and switch-client learnt the '-t' option to accept a window + and/or a pane to use. +* Copy-mode is only exited if no selection is in progress. +* Paste key in copy-mode is now possible to enter text from the clipboard. +* status-interval set to '0' now works as intended. +* tmux now supports 256 colours running under fbterm. +* Many bug fixes! + CHANGES FROM 1.7 to 1.8, 26 March 2013 Incompatible Changes diff --git a/configure.ac b/configure.ac index f646a0d0..4d6f2d1c 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ AC_CHECK_HEADERS( ) # Is this a debug build? -found_debug=yes +#found_debug=yes AC_ARG_ENABLE( debug, AC_HELP_STRING(--enable-debug, create a debug build), From 1ab0745f8e6896a815ce7a696d883d4d07c18677 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Thu, 20 Feb 2014 21:44:33 +0000 Subject: [PATCH 5/6] Working on 1.10 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 4d6f2d1c..fec79043 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # $Id$ # Miscellaneous autofoo bullshit. -AC_INIT(tmux, 1.9) +AC_INIT(tmux, 1.10) AC_CONFIG_AUX_DIR(etc) AM_INIT_AUTOMAKE([foreign subdir-objects]) @@ -45,7 +45,7 @@ AC_CHECK_HEADERS( ) # Is this a debug build? -#found_debug=yes +found_debug=yes AC_ARG_ENABLE( debug, AC_HELP_STRING(--enable-debug, create a debug build), From 9120df33efdbaac82c152ed3d5995e2be7a70411 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Thu, 20 Feb 2014 23:20:17 +0000 Subject: [PATCH 6/6] dist: Call clean target before any other action In case 'make dist' is invoked from a dirty tree which hasn't had its object files cleaned up, clean out the tree first before tarring up the files for a release. --- Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index e5a7286e..a9ad5b97 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,6 +9,7 @@ EXTRA_DIST = \ CHANGES FAQ README TODO COPYING examples compat \ array.h compat.h tmux.h osdep-*.c mdoc2man.awk tmux.1 dist-hook: + make clean grep "^#found_debug=" configure find $(distdir) -name .svn -type d|xargs rm -Rf