version 1.61, 2018/04/18 14:35:37 |
version 1.62, 2018/05/03 16:56:59 |
|
|
if (window[0] != '+' && window[0] != '-') { |
if (window[0] != '+' && window[0] != '-') { |
idx = strtonum(window, 0, INT_MAX, &errstr); |
idx = strtonum(window, 0, INT_MAX, &errstr); |
if (errstr == NULL) { |
if (errstr == NULL) { |
if (fs->flags & CMD_FIND_WINDOW_INDEX) { |
|
fs->idx = idx; |
|
return (0); |
|
} |
|
fs->wl = winlink_find_by_index(&fs->s->windows, idx); |
fs->wl = winlink_find_by_index(&fs->s->windows, idx); |
if (fs->wl != NULL) { |
if (fs->wl != NULL) { |
fs->w = fs->wl->window; |
fs->w = fs->wl->window; |
return (0); |
return (0); |
} |
} |
|
if (fs->flags & CMD_FIND_WINDOW_INDEX) { |
|
fs->idx = idx; |
|
return (0); |
|
} |
} |
} |
} |
} |
|
|
|
|
/* This will fill in session, winlink and window. */ |
/* This will fill in session, winlink and window. */ |
if (cmd_find_get_window(fs, window, window_only) != 0) |
if (cmd_find_get_window(fs, window, window_only) != 0) |
goto no_window; |
goto no_window; |
fs->wp = fs->wl->window->active; |
if (fs->wl != NULL) /* can be NULL if index only */ |
|
fs->wp = fs->wl->window->active; |
goto found; |
goto found; |
} |
} |
|
|