aboutsummaryrefslogtreecommitdiff
path: root/resize.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-14 16:47:20 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-14 16:47:20 +0000
commit0f403474aaf0f4aa4475ef6095d1ab420ebfed60 (patch)
tree2a51f3a931cfa23f39b2f737dd682ddc0e03611a /resize.c
parent62d7ad2690c0f72f06195351aa50e3fe037f456a (diff)
downloadrtmux-0f403474aaf0f4aa4475ef6095d1ab420ebfed60.tar.gz
rtmux-0f403474aaf0f4aa4475ef6095d1ab420ebfed60.tar.bz2
rtmux-0f403474aaf0f4aa4475ef6095d1ab420ebfed60.zip
New window options: force-width and force-height. This will force a window to
an arbitrary width and height (0 for the default unlimited). This is neat for emacs which doesn't have a sensible way to force hard wrapping at 80 columns. Also, don't try to be clever and use clr_eol when redrawing the whole screen, it causes trouble since the redraw functions are used to draw the blank areas too.
Diffstat (limited to 'resize.c')
-rw-r--r--resize.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/resize.c b/resize.c
index 2a7db335..3d6b6348 100644
--- a/resize.c
+++ b/resize.c
@@ -1,4 +1,4 @@
-/* $Id: resize.c,v 1.14 2008-06-14 12:05:06 nicm Exp $ */
+/* $Id: resize.c,v 1.15 2008-06-14 16:47:20 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -114,6 +114,11 @@ recalculate_sizes(void)
}
w->flags &= ~WINDOW_HIDDEN;
+ if (ssx > w->limitx)
+ ssx = w->limitx;
+ if (ssy > w->limity)
+ ssy = w->limity;
+
if (screen_size_x(&w->base) == ssx &&
screen_size_y(&w->base) == ssy)
continue;