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.)"""