Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2015-04-22 10:05:54 +01:00
21 changed files with 477 additions and 245 deletions

8
cmd.c
View File

@ -780,15 +780,15 @@ cmd_lookup_index(struct session *s, const char *name, int *ambiguous)
const char *errstr;
u_int idx;
idx = strtonum(name, 0, INT_MAX, &errstr);
if (errstr == NULL)
return (idx);
if ((wl = cmd_lookup_window(s, name, ambiguous)) != NULL)
return (wl->idx);
if (*ambiguous)
return (-1);
idx = strtonum(name, 0, INT_MAX, &errstr);
if (errstr == NULL)
return (idx);
return (-1);
}