diff --git a/gtm b/gtm index 91a1d25..8006740 100755 --- a/gtm +++ b/gtm @@ -998,7 +998,9 @@ def draw_resize_handle(stdscr, state: AppState, layout: StatusBarLayout): if state.status_bar_height > 2: handle_text += f" ({state.status_bar_height} lines)" handle_x = layout.screen_width // 2 - len(handle_text) // 2 - stdscr.addstr(layout.main_status_y, handle_x, handle_text, curses.A_REVERSE | curses.A_BOLD) + # Draw the handle on the main status line, but only if it won't overlap with other content + if handle_x > 0 and handle_x + len(handle_text) < layout.screen_width: + stdscr.addstr(layout.main_status_y, handle_x, handle_text, curses.A_REVERSE | curses.A_BOLD) except curses.error: pass @@ -1014,8 +1016,8 @@ def draw_status_bars(stdscr, state): draw_commit_details(stdscr, state, layout) else: draw_main_status_line(stdscr, state, layout) + draw_resize_handle(stdscr, state, layout) # Draw handle before commit details draw_commit_details(stdscr, state, layout) - draw_resize_handle(stdscr, state, layout) def draw_ui(stdscr, state): stdscr.erase()