diff options
author | Thomas Adam <thomas@xteddy.org> | 2019-05-12 21:02:27 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2019-05-12 21:02:27 +0100 |
commit | 699d9d2facd377c72c962e1f029f654530e8bba8 (patch) | |
tree | c5a71356eafec8f137ae30977e93f4d406cc80a4 | |
parent | 42da951edfc1fadee0e9e7f08deedb24ffe482b8 (diff) | |
parent | c3c3927c2bf90f10623374edb579eb19fb192ab7 (diff) | |
download | rtmux-699d9d2facd377c72c962e1f029f654530e8bba8.tar.gz rtmux-699d9d2facd377c72c962e1f029f654530e8bba8.tar.bz2 rtmux-699d9d2facd377c72c962e1f029f654530e8bba8.zip |
Merge branch 'obsd-master'
-rw-r--r-- | cmd-show-options.c | 2 | ||||
-rw-r--r-- | mode-tree.c | 2 | ||||
-rw-r--r-- | options.c | 13 | ||||
-rw-r--r-- | server-client.c | 16 | ||||
-rw-r--r-- | style.c | 4 | ||||
-rw-r--r-- | window-copy.c | 3 |
6 files changed, 22 insertions, 18 deletions
diff --git a/cmd-show-options.c b/cmd-show-options.c index e3cfbc54..a8bf597e 100644 --- a/cmd-show-options.c +++ b/cmd-show-options.c @@ -90,7 +90,7 @@ cmd_show_options_exec(struct cmd *self, struct cmdq_item *item) window = (self->entry == &cmd_show_window_options_entry); if (args->argc == 0) { - scope = options_scope_from_flags(args, window, fs, &oo, &cause); + options_scope_from_flags(args, window, fs, &oo, &cause); return (cmd_show_options_all(self, item, oo)); } argument = format_single(item, args->argv[0], c, s, wl, NULL); diff --git a/mode-tree.c b/mode-tree.c index eb642826..fb186c1a 100644 --- a/mode-tree.c +++ b/mode-tree.c @@ -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; @@ -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/server-client.c b/server-client.c index fdc40d8d..b61c1fa9 100644 --- a/server-client.c +++ b/server-client.c @@ -424,17 +424,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); @@ -1001,7 +1005,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; @@ -1015,7 +1018,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) @@ -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/window-copy.c b/window-copy.c index 95319959..84bef8e4 100644 --- a/window-copy.c +++ b/window-copy.c @@ -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. */ |