Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2017-03-11 16:01:12 +00:00
commit 266e662fae
2 changed files with 7 additions and 6 deletions

View File

@ -482,8 +482,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)
@ -673,8 +673,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);
} }

View File

@ -904,10 +904,11 @@ layout_split_pane(struct window_pane *wp, enum layout_type type, int size,
/* Create the new cell. */ /* Create the new cell. */
lcnew = layout_create_cell(lc); lcnew = layout_create_cell(lc);
size = saved_size - 1 - new_size;
if (lc->type == LAYOUT_LEFTRIGHT) 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) 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) if (insert_before)
TAILQ_INSERT_HEAD(&lc->cells, lcnew, entry); TAILQ_INSERT_HEAD(&lc->cells, lcnew, entry);
else else