diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-05-18 21:16:09 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-05-18 21:16:09 +0000 |
commit | d601c42ea224f44faa4cd3cc92992d8dd335062a (patch) | |
tree | f24b466a8a278f11dfafd696de82b2909e9d32b1 /layout.c | |
parent | b23361685367bb4a695a56dc26fedc82de530760 (diff) |
Behave properly when resize not supported.
Diffstat (limited to 'layout.c')
-rw-r--r-- | layout.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: layout.c,v 1.9 2009-05-18 21:06:16 nicm Exp $ */ +/* $Id: layout.c,v 1.10 2009-05-18 21:16:09 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -109,10 +109,15 @@ layout_refresh(struct window *w, int active_only) server_redraw_window(w); } -void +int layout_resize(struct window_pane *wp, int adjust) { - layouts[wp->window->layout].resize(wp, adjust); + struct window *w = wp->window; + + if (layouts[w->layout].resize == NULL) + return (-1); + layouts[w->layout].resize(wp, adjust); + return (0); } void |