summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tmux/cmd-show-options.c6
-rw-r--r--usr.bin/tmux/mode-tree.c4
-rw-r--r--usr.bin/tmux/options.c15
-rw-r--r--usr.bin/tmux/server-client.c18
-rw-r--r--usr.bin/tmux/style.c6
-rw-r--r--usr.bin/tmux/window-copy.c5
6 files changed, 28 insertions, 26 deletions
diff --git a/usr.bin/tmux/cmd-show-options.c b/usr.bin/tmux/cmd-show-options.c
index 8d053ba51f0..2baf2bdab4d 100644
--- a/usr.bin/tmux/cmd-show-options.c
+++ b/usr.bin/tmux/cmd-show-options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-show-options.c,v 1.49 2019/04/30 18:02:03 nicm Exp $ */
+/* $OpenBSD: cmd-show-options.c,v 1.50 2019/05/12 18:16:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -90,10 +90,8 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item)
struct options_entry *o;
window = (self->entry == &cmd_show_window_options_entry);
- if (args->argc == 0) {
- scope = options_scope_from_flags(args, window, fs, &oo, &cause);
+ if (args->argc == 0)
return (cmd_show_options_all(self, item, oo));
- }
argument = format_single(item, args->argv[0], c, s, wl, NULL);
name = options_match(argument, &idx, &ambiguous);
diff --git a/usr.bin/tmux/mode-tree.c b/usr.bin/tmux/mode-tree.c
index 302d8af1f3a..a130d504200 100644
--- a/usr.bin/tmux/mode-tree.c
+++ b/usr.bin/tmux/mode-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mode-tree.c,v 1.28 2019/05/12 08:58:09 nicm Exp $ */
+/* $OpenBSD: mode-tree.c,v 1.29 2019/05/12 18:16:33 nicm Exp $ */
/*
* Copyright (c) 2017 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -819,7 +819,7 @@ mode_tree_display_menu(struct mode_tree_data *mtd, struct client *c, u_int x,
line = mtd->current;
else
line = mtd->offset + y;
- mti = mtd->line_list[line].item;
+ mti = mtd->line_list[line].item;
if (!outside) {
s = mtd->menu;
diff --git a/usr.bin/tmux/options.c b/usr.bin/tmux/options.c
index 003f1547b6a..588f30d9b2f 100644
--- a/usr.bin/tmux/options.c
+++ b/usr.bin/tmux/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.43 2019/04/26 11:38:51 nicm Exp $ */
+/* $OpenBSD: options.c,v 1.44 2019/05/12 18:16:33 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -354,16 +354,23 @@ options_array_set(struct options_entry *o, u_int idx, const char *value,
struct options_array_item *a;
char *new;
struct cmd_list *cmdlist;
+ char *error;
if (!OPTIONS_IS_ARRAY(o)) {
- *cause = xstrdup("not an array");
+ if (cause != NULL)
+ *cause = xstrdup("not an array");
return (-1);
}
if (OPTIONS_IS_COMMAND(o)) {
- cmdlist = cmd_string_parse(value, NULL, 0, cause);
- if (cmdlist == NULL && *cause != NULL)
+ cmdlist = cmd_string_parse(value, NULL, 0, &error);
+ if (cmdlist == NULL && error != NULL) {
+ if (cause != NULL)
+ *cause = error;
+ else
+ free(error);
return (-1);
+ }
}
a = options_array_item(o, idx);
diff --git a/usr.bin/tmux/server-client.c b/usr.bin/tmux/server-client.c
index beab89bc5dd..5275368661d 100644
--- a/usr.bin/tmux/server-client.c
+++ b/usr.bin/tmux/server-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-client.c,v 1.282 2019/05/08 18:07:12 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.283 2019/05/12 18:16:33 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -426,17 +426,21 @@ server_client_check_mouse(struct client *c, struct key_event *event)
key_code key;
struct timeval tv;
struct style_range *sr;
- enum { NOTYPE, MOVE, DOWN, UP, DRAG, WHEEL, DOUBLE, TRIPLE } type;
+ enum { NOTYPE,
+ MOVE,
+ DOWN,
+ UP,
+ DRAG,
+ WHEEL,
+ DOUBLE,
+ TRIPLE } type = NOTYPE;
enum { NOWHERE,
PANE,
STATUS,
STATUS_LEFT,
STATUS_RIGHT,
STATUS_DEFAULT,
- BORDER } where;
-
- type = NOTYPE;
- where = NOWHERE;
+ BORDER } where = NOWHERE;
log_debug("%s mouse %02x at %u,%u (last %u,%u) (%d)", c->name, m->b,
m->x, m->y, m->lx, m->ly, c->tty.mouse_drag_flag);
@@ -1003,7 +1007,6 @@ server_client_key_callback(struct cmdq_item *item, void *data)
struct mouse_event *m = &event->m;
struct session *s = c->session;
struct winlink *wl;
- struct window *w;
struct window_pane *wp;
struct window_mode_entry *wme;
struct timeval tv;
@@ -1017,7 +1020,6 @@ server_client_key_callback(struct cmdq_item *item, void *data)
if (s == NULL || (c->flags & (CLIENT_DEAD|CLIENT_SUSPENDED)) != 0)
goto out;
wl = s->curw;
- w = wl->window;
/* Update the activity timer. */
if (gettimeofday(&c->activity_time, NULL) != 0)
diff --git a/usr.bin/tmux/style.c b/usr.bin/tmux/style.c
index 779d523c578..73e710d38d5 100644
--- a/usr.bin/tmux/style.c
+++ b/usr.bin/tmux/style.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: style.c,v 1.19 2019/04/05 20:32:31 nicm Exp $ */
+/* $OpenBSD: style.c,v 1.20 2019/05/12 18:16:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -57,10 +57,8 @@ style_parse(struct style *sy, const struct grid_cell *base, const char *in)
style_copy(&saved, sy);
do {
- while (*in != '\0' && strchr(delimiters, *in) != NULL) {
+ while (*in != '\0' && strchr(delimiters, *in) != NULL)
in++;
- end--;
- }
if (*in == '\0')
break;
diff --git a/usr.bin/tmux/window-copy.c b/usr.bin/tmux/window-copy.c
index 33e2e34fb71..ded4bb22c37 100644
--- a/usr.bin/tmux/window-copy.c
+++ b/usr.bin/tmux/window-copy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window-copy.c,v 1.221 2019/05/07 19:46:17 nicm Exp $ */
+/* $OpenBSD: window-copy.c,v 1.222 2019/05/12 18:16:33 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1046,8 +1046,6 @@ window_copy_cmd_previous_matching_bracket(struct window_copy_cmd_state *cs)
goto retry;
}
window_copy_cursor_previous_word(wme, "}]) ");
- px = data->cx;
- continue;
}
continue;
}
@@ -1161,7 +1159,6 @@ window_copy_cmd_next_matching_bracket(struct window_copy_cmd_state *cs)
goto retry;
}
window_copy_cursor_next_word_end(wme, "{[( ");
- px = data->cx;
continue;
}
/* For vi, continue searching for bracket until EOL. */