From 0fe3b739a1ef8b06a450a1a84663d01355214519 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 11 Mar 2017 15:16:08 +0000 Subject: [PATCH 1/2] Only look for window and pane parts of target as a sesson and window if they look like an ID. --- cmd-find.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd-find.c b/cmd-find.c index 2f28a028..779b0ba7 100644 --- a/cmd-find.c +++ b/cmd-find.c @@ -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); } From d455da45eb8292185964041f1967a8b0b28c88af Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 11 Mar 2017 15:16:35 +0000 Subject: [PATCH 2/2] Fix calculation of size for full size splits. --- layout.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/layout.c b/layout.c index 47d01851..5c2224bb 100644 --- a/layout.c +++ b/layout.c @@ -904,10 +904,11 @@ layout_split_pane(struct window_pane *wp, enum layout_type type, int size, /* Create the new cell. */ lcnew = layout_create_cell(lc); + size = saved_size - 1 - new_size; if (lc->type == LAYOUT_LEFTRIGHT) - layout_set_size(lcnew, new_size, sy, 0, 0); + layout_set_size(lcnew, size, sy, 0, 0); else if (lc->type == LAYOUT_TOPBOTTOM) - layout_set_size(lcnew, sx, new_size, 0, 0); + layout_set_size(lcnew, sx, size, 0, 0); if (insert_before) TAILQ_INSERT_HEAD(&lc->cells, lcnew, entry); else