From 1fd3a4ab3942665921eed4a2b031473d16121eda Mon Sep 17 00:00:00 2001 From: Jamie Lentin Date: Wed, 7 Feb 2024 22:48:17 +0000 Subject: [PATCH] term: Disable standout before clearing lines On some terminals, notably https://tomscii.sig7.se/zutty/ or https://termux.dev/en/, the screen will be filled with reverse video on startup & pressing enter will fill the remainder of any line with reverse video. These terminals seem to honour standout mode when clearing to the end of the line, which xterm doesn't. Work around this by clearing any active standout mode before clearing the rest of a line. --- src/term.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/term.c b/src/term.c index 8bb33fd..ada74ac 100644 --- a/src/term.c +++ b/src/term.c @@ -650,6 +650,7 @@ void move_cursor (const int row, const int col) { void clear_end_of_line(const int first_unused_hpos) { if (curX >= first_unused_hpos) return; + if (standout_mode) turn_off_standout(); if (curr_attr & BG_NOT_DEFAULT) set_attr(0); if (ne_clr_eol) OUTPUT1 (ne_clr_eol); else {