mirror of
https://github.com/tmux/tmux.git
synced 2026-10-10 20:24:21 +00:00
Check for width/height 0, based on change from Uzair Aftab.
This commit is contained in:
@@ -834,6 +834,11 @@ mode_tree_draw(struct mode_tree_data *mtd)
|
|||||||
if (mtd->line_size == 0)
|
if (mtd->line_size == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
w = mtd->width;
|
||||||
|
h = mtd->height;
|
||||||
|
if (w == 0 || h == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
memcpy(&gc0, &grid_default_cell, sizeof gc0);
|
memcpy(&gc0, &grid_default_cell, sizeof gc0);
|
||||||
memcpy(&gc, &grid_default_cell, sizeof gc);
|
memcpy(&gc, &grid_default_cell, sizeof gc);
|
||||||
style_apply(&gc, oo, "tree-mode-selection-style", NULL);
|
style_apply(&gc, oo, "tree-mode-selection-style", NULL);
|
||||||
@@ -843,9 +848,6 @@ mode_tree_draw(struct mode_tree_data *mtd)
|
|||||||
dfg = gc.fg;
|
dfg = gc.fg;
|
||||||
dfg0 = gc0.fg;
|
dfg0 = gc0.fg;
|
||||||
|
|
||||||
w = mtd->width;
|
|
||||||
h = mtd->height;
|
|
||||||
|
|
||||||
screen_write_start(&ctx, s);
|
screen_write_start(&ctx, s);
|
||||||
screen_write_clearscreen(&ctx, 8);
|
screen_write_clearscreen(&ctx, 8);
|
||||||
ft = format_create_defaults(NULL, NULL, NULL, NULL, wp);
|
ft = format_create_defaults(NULL, NULL, NULL, NULL, wp);
|
||||||
|
|||||||
Reference in New Issue
Block a user