Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2017-06-16 18:01:13 +01:00
commit a61200776d
2 changed files with 14 additions and 4 deletions

View File

@ -949,7 +949,7 @@ cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item,
struct mouse_event *m; struct mouse_event *m;
struct cmd_find_state current; struct cmd_find_state current;
char *colon, *period, *copy = NULL; char *colon, *period, *copy = NULL;
const char *session, *window, *pane; const char *session, *window, *pane, *s;
int window_only = 0, pane_only = 0; int window_only = 0, pane_only = 0;
/* Can fail flag implies quiet. */ /* Can fail flag implies quiet. */
@ -957,10 +957,18 @@ cmd_find_target(struct cmd_find_state *fs, struct cmdq_item *item,
flags |= CMD_FIND_QUIET; flags |= CMD_FIND_QUIET;
/* Log the arguments. */ /* Log the arguments. */
if (target == NULL) if (type == CMD_FIND_PANE)
log_debug("%s: target none, type %d", __func__, type); s = "pane";
else if (type == CMD_FIND_WINDOW)
s = "window";
else if (type == CMD_FIND_SESSION)
s = "session";
else else
log_debug("%s: target %s, type %d", __func__, target, type); s = "unknown";
if (target == NULL)
log_debug("%s: target none, type %s", __func__, s);
else
log_debug("%s: target %s, type %s", __func__, target, s);
log_debug("%s: item %p, flags %#x", __func__, item, flags); log_debug("%s: item %p, flags %#x", __func__, item, flags);
/* Clear new state. */ /* Clear new state. */

View File

@ -453,6 +453,8 @@ cmdq_error(struct cmdq_item *item, const char *fmt, ...)
msglen = xvasprintf(&msg, fmt, ap); msglen = xvasprintf(&msg, fmt, ap);
va_end(ap); va_end(ap);
log_debug("%s: %s", __func__, msg);
if (c == NULL) if (c == NULL)
cfg_add_cause("%s:%u: %s", cmd->file, cmd->line, msg); cfg_add_cause("%s:%u: %s", cmd->file, cmd->line, msg);
else if (c->session == NULL || (c->flags & CLIENT_CONTROL)) { else if (c->session == NULL || (c->flags & CLIENT_CONTROL)) {