previous-layout command.

This commit is contained in:
Nicholas Marriott
2009-04-30 21:17:06 +00:00
parent a6f2d82335
commit 044e6f7660
9 changed files with 96 additions and 24 deletions

View File

@ -1,4 +1,4 @@
/* $Id: layout.c,v 1.4 2009-04-30 16:27:29 nicm Exp $ */
/* $Id: layout.c,v 1.5 2009-04-30 21:17:06 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@ -61,6 +61,21 @@ layout_next(struct window *w)
layout_refresh(w, 0);
}
void
layout_previous(struct window *w)
{
if (w->layout == 0)
w->layout = nitems(layouts) - 1;
else
w->layout--;
if (w->layout == 0) {
/* XXX Special-case manual. */
window_fit_panes(w);
window_update_panes(w);
}
layout_refresh(w, 0);
}
void
layout_refresh(struct window *w, unused int active_changed)
{