mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 22:43:58 +00:00
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:
11
tty-write.c
11
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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user