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:
15
status.c
15
status.c
@ -1,4 +1,4 @@
|
||||
/* $Id: status.c,v 1.60 2009-01-11 23:31:46 nicm Exp $ */
|
||||
/* $Id: status.c,v 1.61 2009-01-12 18:22:47 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||
@ -258,18 +258,17 @@ off:
|
||||
* status is off. Not sure this is the right place for this.
|
||||
*/
|
||||
screen_write_start(&ctx, NULL, &c->status);
|
||||
wp = s->curw->window->panes[1];
|
||||
sy = c->sy - (c->sy / 2);
|
||||
if (wp == NULL) {
|
||||
wp = s->curw->window->panes[0];
|
||||
sy = c->sy;
|
||||
wp = s->curw->window->panes[0];
|
||||
sy = wp->sy;
|
||||
if (s->curw->window->panes[1] != NULL) {
|
||||
wp = s->curw->window->panes[1];
|
||||
sy += wp->sy + 1;
|
||||
}
|
||||
screen_write_cursormove(&ctx, 0, 0);
|
||||
if (screen_size_y(wp->screen) < sy) {
|
||||
if (sy < c->sy - 1) {
|
||||
/* If the screen is too small, use blank. */
|
||||
for (offset = 0; offset < c->sx; offset++)
|
||||
screen_write_putc(&ctx, &gc, ' ');
|
||||
abort();
|
||||
} else {
|
||||
screen_write_copy(&ctx, wp->screen, 0, wp->screen->grid->hsize +
|
||||
screen_size_y(wp->screen) - 1, c->sx, 1);
|
||||
|
Reference in New Issue
Block a user