From 1afe5c7b4ba93dd56d65d4da44377f02613d6333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= Date: Mon, 22 Dec 2025 16:58:28 +0100 Subject: [PATCH] terminal-util: also send ANSI_NORMAL in terminal_reset_ansi_seq Certain terminal emulators (alacritty, ghostty and kitty) require ANSI_NORMAL to be sent to reset the colours. Followup for 3d97db8f3c3e86b70d09444965ebfddd051df39c. Fixes: #40163 --- src/basic/terminal-util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index 9abef38aad..ce3a76bdd0 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -969,7 +969,8 @@ int terminal_reset_ansi_seq(int fd) { k = loop_write_full(fd, "\033[!p" /* soft terminal reset */ - "\033]104\007" /* reset colors */ + "\033]104\007" /* reset colors via OSC104 */ + ANSI_NORMAL /* reset colors */ "\033[?7h" /* enable line-wrapping */ "\033[1G" /* place cursor at beginning of current line */ "\033[0J", /* erase till end of screen */