Store state shared between multiple commands in the queue in a shared

structure.
This commit is contained in:
nicm
2017-04-21 14:01:19 +00:00
parent 311dad8c28
commit bba588752f
14 changed files with 68 additions and 43 deletions

View File

@ -998,8 +998,8 @@ cmd_find_target(struct cmd_find_state *fs, struct cmd_find_state *current,
if (server_check_marked() && (flags & CMD_FIND_DEFAULT_MARKED)) {
fs->current = &marked_pane;
log_debug("%s: current is marked pane", __func__);
} else if (cmd_find_valid_state(&item->current)) {
fs->current = &item->current;
} else if (cmd_find_valid_state(&item->shared->current)) {
fs->current = &item->shared->current;
log_debug("%s: current is from queue", __func__);
} else {
fs->current = current;
@ -1015,7 +1015,7 @@ cmd_find_target(struct cmd_find_state *fs, struct cmd_find_state *current,
/* Mouse target is a plain = or {mouse}. */
if (strcmp(target, "=") == 0 || strcmp(target, "{mouse}") == 0) {
m = &item->mouse;
m = &item->shared->mouse;
switch (type) {
case CMD_FIND_PANE:
fs->wp = cmd_mouse_pane(m, &fs->s, &fs->wl);