From 261dc75b952dd7dad863a79e29b04e145a112452 Mon Sep 17 00:00:00 2001 From: "n loewen (aider)" Date: Sun, 8 Jun 2025 00:00:04 +0100 Subject: [PATCH] feat: Add space and highlight active pane scroll percentage --- gtm2.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gtm2.py b/gtm2.py index 41eec5e..0900ae8 100755 --- a/gtm2.py +++ b/gtm2.py @@ -390,7 +390,9 @@ def draw_status_bars(stdscr, state): # Add left percentage indicator (only if sidebar is visible) if state.show_sidebar: try: - stdscr.addstr(state.height - 1, 1, left_status, status_attr) + # Use reverse video if left pane is active + left_attr = status_attr | curses.A_REVERSE if state.focus == "left" else status_attr + stdscr.addstr(state.height - 1, 1, left_status, left_attr) except curses.error: pass @@ -398,7 +400,7 @@ def draw_status_bars(stdscr, state): if commit_message: # Calculate available space left_margin = len(left_status) + 3 if state.show_sidebar else 1 - right_margin = len(right_status) + 1 + right_margin = len(right_status) + 3 # Add more space before right percentage available_width = state.width - left_margin - right_margin # Truncate message if needed @@ -413,11 +415,13 @@ def draw_status_bars(stdscr, state): except curses.error: pass - # Add right percentage indicator + # Add right percentage indicator with highlighting for active pane try: - right_x = state.width - len(right_status) - 1 + right_x = state.width - len(right_status) - 3 # More space before percentage if right_x >= 0: - stdscr.addstr(state.height - 1, right_x, right_status, status_attr) + # Use reverse video if right pane is active + right_attr = status_attr | curses.A_REVERSE if state.focus == "right" else status_attr + stdscr.addstr(state.height - 1, right_x, right_status, right_attr) except curses.error: pass