mirror of
https://github.com/tmux/tmux.git
synced 2026-06-21 09:45:41 +00:00
Some other fixes.
This commit is contained in:
@@ -270,6 +270,7 @@ cmd_display_panes_draw(struct client *c, __unused void *data)
|
|||||||
struct window *w = s->curw->window;
|
struct window *w = s->curw->window;
|
||||||
struct window_pane *wp;
|
struct window_pane *wp;
|
||||||
struct cmd_display_panes_ctx ctx;
|
struct cmd_display_panes_ctx ctx;
|
||||||
|
u_int lines;
|
||||||
|
|
||||||
log_debug("%s: %s @%u", __func__, c->name, w->id);
|
log_debug("%s: %s @%u", __func__, c->name, w->id);
|
||||||
|
|
||||||
@@ -277,7 +278,10 @@ cmd_display_panes_draw(struct client *c, __unused void *data)
|
|||||||
ctx.c = c;
|
ctx.c = c;
|
||||||
tty_window_offset(&c->tty, &ctx.ox, &ctx.oy, &ctx.sx, &ctx.sy);
|
tty_window_offset(&c->tty, &ctx.ox, &ctx.oy, &ctx.sx, &ctx.sy);
|
||||||
if (options_get_number(s->options, "status-position") == 0) {
|
if (options_get_number(s->options, "status-position") == 0) {
|
||||||
ctx.statuslines = status_line_size(c);
|
lines = status_line_size(c);
|
||||||
|
if (c->message_string != NULL || c->prompt_string != NULL)
|
||||||
|
lines = (lines == 0 ? 1 : lines);
|
||||||
|
ctx.statuslines = lines;
|
||||||
ctx.statustop = 1;
|
ctx.statustop = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,11 +124,12 @@ window_make_pane_status(struct window_pane *wp, struct client *c, u_int width,
|
|||||||
struct screen old;
|
struct screen old;
|
||||||
char *expanded;
|
char *expanded;
|
||||||
u_int i;
|
u_int i;
|
||||||
|
enum pane_lines pane_lines;
|
||||||
int pane_status, cell_type;
|
int pane_status, cell_type;
|
||||||
|
|
||||||
pane_status = window_pane_get_pane_status(wp);
|
pane_status = window_pane_get_pane_status(wp);
|
||||||
if (pane_status == PANE_STATUS_OFF || width == 0)
|
if (pane_status == PANE_STATUS_OFF || width == 0)
|
||||||
return;
|
return (0);
|
||||||
|
|
||||||
ft = format_create(c, NULL, FORMAT_PANE|wp->id, FORMAT_STATUS);
|
ft = format_create(c, NULL, FORMAT_PANE|wp->id, FORMAT_STATUS);
|
||||||
format_defaults(ft, c, c->session, c->session->curw, wp);
|
format_defaults(ft, c, c->session, c->session->curw, wp);
|
||||||
@@ -136,17 +137,16 @@ window_make_pane_status(struct window_pane *wp, struct client *c, u_int width,
|
|||||||
fmt = options_get_string(wp->options, "pane-border-format");
|
fmt = options_get_string(wp->options, "pane-border-format");
|
||||||
expanded = format_expand_time(ft, fmt);
|
expanded = format_expand_time(ft, fmt);
|
||||||
|
|
||||||
screen_free(&wp->status_screen);
|
memcpy(&old, &wp->status_screen, sizeof old);
|
||||||
screen_init(&wp->status_screen, width, 1, 0);
|
screen_init(&wp->status_screen, width, 1, 0);
|
||||||
wp->status_screen.mode = 0;
|
wp->status_screen.mode = 0;
|
||||||
|
|
||||||
memcpy(&old, &wp->status_screen, sizeof old);
|
|
||||||
screen_write_start(&ctx, &wp->status_screen);
|
screen_write_start(&ctx, &wp->status_screen);
|
||||||
|
|
||||||
window_pane_get_border_style(wp, c, &gc);
|
window_pane_get_border_style(wp, c, &gc);
|
||||||
|
pane_lines = window_pane_get_pane_lines(wp);
|
||||||
for (i = 0; i < width; i++) {
|
for (i = 0; i < width; i++) {
|
||||||
cell_type = screen_redraw_get_span_cell_type(span, i);
|
cell_type = screen_redraw_get_span_cell_type(span, i);
|
||||||
window_pane_get_border_cell(wp, cell_type, &gc);
|
window_get_border_cell(wp->window, wp, pane_lines, cell_type, &gc);
|
||||||
screen_write_cell(&ctx, &gc);
|
screen_write_cell(&ctx, &gc);
|
||||||
}
|
}
|
||||||
gc.attr &= ~GRID_ATTR_CHARSET;
|
gc.attr &= ~GRID_ATTR_CHARSET;
|
||||||
|
|||||||
Reference in New Issue
Block a user