From 6b84f1fc2bd20d2a95e4fcfba75ebd253d5e5c7e Mon Sep 17 00:00:00 2001 From: "n loewen (aider)" Date: Sun, 8 Jun 2025 16:35:10 +0100 Subject: [PATCH] style: Modify warning message display to keep text in red --- gtm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gtm b/gtm index 8ee33f5..8850faf 100755 --- a/gtm +++ b/gtm @@ -922,14 +922,14 @@ def draw_warning_message(stdscr, state: AppState, layout: StatusBarLayout): # Use red text with bold for warning warning_attr = curses.color_pair(8) | curses.A_BOLD - # Draw the warning message + # Draw the warning message and dismiss instruction all in red warning_text = f" WARNING: {state.warning_message} " stdscr.addstr(layout.main_status_y, 0, warning_text, warning_attr) - # Add instruction to dismiss + # Add instruction to dismiss, also in red dismiss_text = " (Press any key to dismiss) " if len(warning_text) + len(dismiss_text) < layout.screen_width: - stdscr.addstr(layout.main_status_y, len(warning_text), dismiss_text, curses.A_REVERSE) + stdscr.addstr(layout.main_status_y, len(warning_text), dismiss_text, warning_attr) except curses.error: pass # Silently fail if we can't draw the warning @@ -1302,10 +1302,6 @@ def handle_mouse_input(stdscr, state: AppState) -> AppState: _, mx, my, _, bstate = curses.getmouse() state = replace(state, last_bstate=bstate, mouse_x=mx, mouse_y=my) - # If there's a warning message, any mouse click dismisses it - if state.warning_message: - return replace(state, warning_message=None) - # Status bar position status_bar_start = state.height - state.status_bar_height