mirror of
https://github.com/tmux/tmux.git
synced 2024-10-31 22:58:49 +00:00
Only look for window and pane parts of target as a sesson and window if
they look like an ID.
This commit is contained in:
parent
55e73e3612
commit
0fe3b739a1
@ -483,8 +483,8 @@ cmd_find_get_window(struct cmd_find_state *fs, const char *window)
|
|||||||
if (cmd_find_get_window_with_session(fs, window) == 0)
|
if (cmd_find_get_window_with_session(fs, window) == 0)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
/* Otherwise try as a session itself. */
|
/* Try as a session if it looks like a session. */
|
||||||
if (cmd_find_get_session(fs, window) == 0) {
|
if (*window == '$' && cmd_find_get_session(fs, window) == 0) {
|
||||||
fs->wl = fs->s->curw;
|
fs->wl = fs->s->curw;
|
||||||
fs->w = fs->wl->window;
|
fs->w = fs->wl->window;
|
||||||
if (~fs->flags & CMD_FIND_WINDOW_INDEX)
|
if (~fs->flags & CMD_FIND_WINDOW_INDEX)
|
||||||
@ -674,8 +674,8 @@ cmd_find_get_pane(struct cmd_find_state *fs, const char *pane)
|
|||||||
if (cmd_find_get_pane_with_window(fs, pane) == 0)
|
if (cmd_find_get_pane_with_window(fs, pane) == 0)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
/* Otherwise try as a window itself (this will also try as session). */
|
/* Try as a window if it looks like a window. */
|
||||||
if (cmd_find_get_window(fs, pane) == 0) {
|
if (*pane == '@' && cmd_find_get_window(fs, pane) == 0) {
|
||||||
fs->wp = fs->w->active;
|
fs->wp = fs->w->active;
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user