summaryrefslogtreecommitdiffstats
path: root/cmd-break-pane.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-05-18 21:01:38 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-05-18 21:01:38 +0000
commitab4e5e8574c3ccffeed275eeebc4845e3f33acab (patch)
tree60b6019361ac2d801c3b2b29531a1acffa175426 /cmd-break-pane.c
parentb6b00c53bdd386b0570544d561e4a9d176d13291 (diff)
Clean up manual layout code:
- change the one layout function into two _refresh and _resize - create layout-manual.c for manual layout code - move the fit panes/update panes code from window.c to the new file as it is only used by manual layout now - move the resize pane code into layout-manual.c as well - get rid of the direct calls to fit/update and make them go through layout - rename a couple of variables This is mainly as a first step before reworking the manual layout code to see if anything breaks.
Diffstat (limited to 'cmd-break-pane.c')
-rw-r--r--cmd-break-pane.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-break-pane.c b/cmd-break-pane.c
index e8e3f945..88271971 100644
--- a/cmd-break-pane.c
+++ b/cmd-break-pane.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-break-pane.c,v 1.2 2009-05-04 17:58:26 nicm Exp $ */
+/* $Id: cmd-break-pane.c,v 1.3 2009-05-18 21:01:38 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -74,18 +74,18 @@ cmd_break_pane_exec(struct cmd *self, struct cmd_ctx *ctx)
if (wl->window->active == NULL)
wl->window->active = TAILQ_NEXT(wp, entry);
}
- window_fit_panes(wl->window);
+ layout_refresh(wl->window, 0);
w = wp->window = window_create1(s->sx, s->sy);
TAILQ_INSERT_HEAD(&w->panes, wp, entry);
w->active = wp;
- window_fit_panes(w);
w->name = default_window_name(w);
wl = session_attach(s, w, -1, &cause); /* can't fail */
-
if (!(data->flags & CMD_DFLAG))
session_select(s, wl->idx);
+ layout_refresh(w, 0);
+
server_redraw_session(s);
return (0);