From 46760052d7f2f7d5576bc9f613d23f4f5cd2e8be Mon Sep 17 00:00:00 2001 From: "n loewen (aider)" Date: Sun, 8 Jun 2025 09:31:01 +0100 Subject: [PATCH] fix: Ensure full reverse video background for multi-line status bar --- gtm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gtm b/gtm index 999ee85..d3fb6fc 100755 --- a/gtm +++ b/gtm @@ -841,11 +841,17 @@ def draw_help_popup(stdscr, state): def draw_status_bar_background(stdscr, layout: StatusBarLayout): """Fill the entire status bar area with reverse video background""" for y in range(layout.start_y, layout.start_y + layout.total_height): - for x in range(layout.screen_width - 1): - try: - stdscr.addch(y, x, ' ', curses.A_REVERSE) - except curses.error: - pass + try: + # Fill the entire line with spaces in reverse video + # This is more efficient than adding characters one by one + stdscr.addstr(y, 0, ' ' * layout.screen_width, curses.A_REVERSE) + except curses.error: + # If we can't fill the entire line at once, try character by character + for x in range(layout.screen_width): + try: + stdscr.addch(y, x, ' ', curses.A_REVERSE) + except curses.error: + pass def draw_main_status_line(stdscr, state: AppState, layout: StatusBarLayout): """Draw the main status line (percentages, indicators, etc.)"""