diff --git a/gtm b/gtm index 26f4b51..91a1d25 100755 --- a/gtm +++ b/gtm @@ -296,6 +296,10 @@ def load_commit_content(state: AppState) -> AppState: if not commit_details['message'].strip(): commit_details['message'] = short_message + # Ensure we have some commit message to display + if not commit_details['message']: + commit_details['message'] = short_message if short_message else "No commit message" + max_scroll_new = max(0, len(file_lines) - (state.height - state.status_bar_height)) right_scroll_offset = state.right_scroll_offset if reference_line: @@ -1381,7 +1385,9 @@ def main(stdscr, filename, show_diff, show_add, show_del, mouse, wrap_lines=True except Exception: pass - state = load_commit_content(state) + # Load initial commit content so commit details are available immediately + if state.commits: + state = load_commit_content(state) # Initial draw before the main loop starts draw_ui(stdscr, state)