diff options
Diffstat (limited to '')
-rw-r--r-- | popup.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -252,6 +252,7 @@ popup_draw_cb(struct client *c, void *data, struct screen_redraw_ctx *rctx) tty_draw_line(tty, &s, 0, i, pd->sx, px, py + i, &defaults, palette); } + screen_free(&s); if (pd->md != NULL) { c->overlay_check = NULL; c->overlay_data = NULL; @@ -573,8 +574,8 @@ menu: x = m->x - (pd->menu->width + 4) / 2; else x = 0; - pd->md = menu_prepare(pd->menu, 0, NULL, x, m->y, c, NULL, - popup_menu_done, pd); + pd->md = menu_prepare(pd->menu, 0, 0, NULL, x, m->y, c, + BOX_LINES_DEFAULT, NULL, NULL, NULL, NULL, popup_menu_done, pd); c->flags |= CLIENT_REDRAWOVERLAY; out: @@ -635,7 +636,7 @@ int popup_display(int flags, enum box_lines lines, struct cmdq_item *item, u_int px, u_int py, u_int sx, u_int sy, struct environ *env, const char *shellcmd, int argc, char **argv, const char *cwd, const char *title, struct client *c, - struct session *s, const char* style, const char* border_style, + struct session *s, const char *style, const char *border_style, popup_close_cb cb, void *arg) { struct popup_data *pd; @@ -786,6 +787,8 @@ popup_editor(struct client *c, const char *buf, size_t len, if (fd == -1) return (-1); f = fdopen(fd, "w"); + if (f == NULL) + return (-1); if (fwrite(buf, len, 1, f) != 1) { fclose(f); return (-1); |