From 37ad1e2f6da31ba8bf09865fccddec61addaad24 Mon Sep 17 00:00:00 2001 From: nicm <nicm> Date: Sun, 12 Jan 2025 14:20:49 +0000 Subject: [PATCH 1/2] Map bright black (colour 8) to white (7) if the background is black on terminals with only eight colours so the text is not invisible. From Dmytro Bagrii in GitHub issue 4322. --- tty.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tty.c b/tty.c index f4676170..0080b7c6 100644 --- a/tty.c +++ b/tty.c @@ -2758,6 +2758,8 @@ tty_check_fg(struct tty *tty, struct colour_palette *palette, gc->fg &= 7; if (colours >= 16) gc->fg += 90; + else if (gc->fg == 0 && gc->bg == 0) + gc->fg = 7; } } return; From 97fe3563facf319971e86ba8d46ccff96983ef0b Mon Sep 17 00:00:00 2001 From: nicm <nicm> Date: Sun, 12 Jan 2025 14:36:28 +0000 Subject: [PATCH 2/2] Do not crash if moving popup that has exited to a pane, from Michael Grant in GitHub issue 4312. --- popup.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/popup.c b/popup.c index 21be8f05..ebe1fc98 100644 --- a/popup.c +++ b/popup.c @@ -353,9 +353,11 @@ popup_make_pane(struct popup_data *pd, enum layout_type type) new_wp = window_add_pane(wp->window, NULL, hlimit, 0); layout_assign_pane(lc, new_wp, 0); - new_wp->fd = job_transfer(pd->job, &new_wp->pid, new_wp->tty, - sizeof new_wp->tty); - pd->job = NULL; + if (pd->job != NULL) { + new_wp->fd = job_transfer(pd->job, &new_wp->pid, new_wp->tty, + sizeof new_wp->tty); + pd->job = NULL; + } screen_set_title(&pd->s, new_wp->base.title); screen_free(&new_wp->base);