From a035a350d4695465937928dbc27896922ef646f2 Mon Sep 17 00:00:00 2001 From: "n loewen (aider)" Date: Sat, 7 Jun 2025 22:41:06 +0100 Subject: [PATCH] fix: Conditionally remove margin padding when not in diff mode --- gtm2.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gtm2.py b/gtm2.py index 5f93f6d..a9ca029 100755 --- a/gtm2.py +++ b/gtm2.py @@ -262,8 +262,12 @@ def draw_right_pane(stdscr, state): stdscr.addstr(display_row, state.divider_col + 2, "- ", curses.color_pair(4)) stdscr.addnstr(display_row, state.divider_col + 4, content, right_width - 2, curses.color_pair(4)) else: - stdscr.addstr(display_row, state.divider_col + 2, " ") - stdscr.addnstr(display_row, state.divider_col + 4, content, right_width - 2) + if state.show_whole_diff or state.show_additions or state.show_deletions: + stdscr.addstr(display_row, state.divider_col + 2, " ") + stdscr.addnstr(display_row, state.divider_col + 4, content, right_width - 2) + else: + # No diff mode, so don't add the margin padding + stdscr.addnstr(display_row, state.divider_col + 2, content, right_width) display_row += 1