diff options
author | nicm <nicm> | 2017-03-11 15:16:08 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-03-11 15:16:08 +0000 |
commit | 0fe3b739a1ef8b06a450a1a84663d01355214519 (patch) | |
tree | b7a77412ead50838b1654ce6604bd3020d6e61cc | |
parent | 55e73e361265c82e4c84bc494cb290bd9df6613e (diff) | |
download | rtmux-0fe3b739a1ef8b06a450a1a84663d01355214519.tar.gz rtmux-0fe3b739a1ef8b06a450a1a84663d01355214519.tar.bz2 rtmux-0fe3b739a1ef8b06a450a1a84663d01355214519.zip |
Only look for window and pane parts of target as a sesson and window if
they look like an ID.
-rw-r--r-- | cmd-find.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) return (0); - /* Otherwise try as a session itself. */ - if (cmd_find_get_session(fs, window) == 0) { + /* Try as a session if it looks like a session. */ + if (*window == '$' && cmd_find_get_session(fs, window) == 0) { fs->wl = fs->s->curw; fs->w = fs->wl->window; 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) return (0); - /* Otherwise try as a window itself (this will also try as session). */ - if (cmd_find_get_window(fs, pane) == 0) { + /* Try as a window if it looks like a window. */ + if (*pane == '@' && cmd_find_get_window(fs, pane) == 0) { fs->wp = fs->w->active; return (0); } |