aboutsummaryrefslogtreecommitdiff
path: root/tty-write.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-12 18:22:47 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-12 18:22:47 +0000
commit7cd3cf0eada8513907cd1cc78d7669752235f419 (patch)
tree387f8f8c1a2976775cd6718812010130d9e27676 /tty-write.c
parent440a84b2aa0457f9d94903f04055c1b662d41fbc (diff)
downloadrtmux-7cd3cf0eada8513907cd1cc78d7669752235f419.tar.gz
rtmux-7cd3cf0eada8513907cd1cc78d7669752235f419.tar.bz2
rtmux-7cd3cf0eada8513907cd1cc78d7669752235f419.zip
Make the window pane code handle panes of different sizes, and add a -l and -p arguments to split-window to specify the new window size in lines or as a percentage.
Diffstat (limited to 'tty-write.c')
-rw-r--r--tty-write.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/tty-write.c b/tty-write.c
index 7151f895..093c5430 100644
--- a/tty-write.c
+++ b/tty-write.c
@@ -1,4 +1,4 @@
-/* $Id: tty-write.c,v 1.4 2009-01-11 23:31:46 nicm Exp $ */
+/* $Id: tty-write.c,v 1.5 2009-01-12 18:22:47 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -36,7 +36,7 @@ tty_vwrite_window(void *ptr, enum tty_cmd cmd, va_list ap)
struct window_pane *wp = ptr;
struct client *c;
va_list aq;
- u_int i, oy;
+ u_int i;
if (wp->window->flags & WINDOW_HIDDEN)
return;
@@ -47,13 +47,8 @@ tty_vwrite_window(void *ptr, enum tty_cmd cmd, va_list ap)
continue;
if (c->session->curw->window == wp->window) {
- if (wp == wp->window->panes[0])
- oy = 0;
- else
- oy = wp->window->sy / 2;
-
va_copy(aq, ap);
- tty_vwrite(&c->tty, wp->screen, oy, cmd, aq);
+ tty_vwrite(&c->tty, wp->screen, wp->yoff, cmd, aq);
va_end(aq);
}
}