aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd-unbind-key.c1
-rw-r--r--format.c17
-rw-r--r--server-client.c2
-rw-r--r--tmux.16
4 files changed, 16 insertions, 10 deletions
diff --git a/cmd-unbind-key.c b/cmd-unbind-key.c
index 9bd068e1..cf6ad506 100644
--- a/cmd-unbind-key.c
+++ b/cmd-unbind-key.c
@@ -50,7 +50,6 @@ cmd_unbind_key_exec(struct cmd *self, struct cmd_q *cmdq)
cmdq_error(cmdq, "missing key");
return (CMD_RETURN_ERROR);
}
- return (CMD_RETURN_ERROR);
key = key_string_lookup_string(args->argv[0]);
if (key == KEYC_NONE) {
cmdq_error(cmdq, "unknown key: %s", args->argv[0]);
diff --git a/format.c b/format.c
index a7f1fdee..1e89b2d2 100644
--- a/format.c
+++ b/format.c
@@ -353,15 +353,20 @@ format_expand(struct format_tree *ft, const char *fmt)
char *
format_get_command(struct window_pane *wp)
{
- char *cmd;
+ char *cmd, *out;
cmd = osdep_get_name(wp->fd, wp->tty);
if (cmd == NULL || *cmd == '\0') {
- cmd = wp->cmd;
- if (cmd == NULL || *cmd == '\0')
- cmd = wp->shell;
+ free(cmd);
+ cmd = xstrdup(wp->cmd);
+ if (cmd == NULL || *cmd == '\0') {
+ free(cmd);
+ cmd = xstrdup(wp->shell);
+ }
}
- return (parse_window_name(cmd));
+ out = parse_window_name(cmd);
+ free(cmd);
+ return (out);
}
/* Set default format keys for a session. */
@@ -518,7 +523,7 @@ format_window_pane(struct format_tree *ft, struct window_pane *wp)
struct grid_line *gl;
unsigned long long size;
u_int i, idx;
- const char *cwd;
+ const char *cmd;
char *cmd;
size = 0;
diff --git a/server-client.c b/server-client.c
index aceef6e2..cc18a96f 100644
--- a/server-client.c
+++ b/server-client.c
@@ -808,6 +808,8 @@ server_client_msg_dispatch(struct client *c)
if (imsg.hdr.peerid != PROTOCOL_VERSION) {
server_write_client(c, MSG_VERSION, NULL, 0);
c->flags |= CLIENT_BAD;
+ if (imsg.fd != -1)
+ close(imsg.fd);
imsg_free(&imsg);
continue;
}
diff --git a/tmux.1 b/tmux.1
index 07eb93fb..1eb02feb 100644
--- a/tmux.1
+++ b/tmux.1
@@ -2738,8 +2738,8 @@ instead redraw it entirely every
.Ar interval
milliseconds.
This helps to prevent fast output (such as
-.Xr yes 1
-overwhelming the terminal).
+.Xr yes 1 )
+overwhelming the terminal.
The default is a trigger of 250 and an interval of 100.
A trigger of zero disables the rate limiting.
.Pp
@@ -3812,4 +3812,4 @@ bind-key S command-prompt "new-window -n %1 'ssh %1'"
.Sh SEE ALSO
.Xr pty 4
.Sh AUTHORS
-.An Nicholas Marriott Aq nicm@users.sourceforge.net
+.An Nicholas Marriott Aq Mt nicm@users.sourceforge.net