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.

This commit is contained in:
Nicholas Marriott
2009-01-12 18:22:47 +00:00
parent 440a84b2aa
commit 7cd3cf0ead
11 changed files with 216 additions and 90 deletions

View File

@ -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);
}
}