feat: Add space and highlight active pane scroll percentage
This commit is contained in:
parent
e6249a29e6
commit
261dc75b95
14
gtm2.py
14
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue