diff --git a/gtm b/gtm index 0ec4ad0..e7223c9 100755 --- a/gtm +++ b/gtm @@ -654,6 +654,32 @@ def draw_help_popup(stdscr, state): return + # Define help content + help_items = [ + ("Navigation", ""), + ("j / Down", "Scroll down"), + ("k / Up", "Scroll up"), + ("Space / Page Down", "Page down"), + ("b / Page Up", "Page up"), + ("h / Left", "Focus left pane"), + ("l / Right", "Focus right pane"), + ("", ""), + ("Features", ""), + ("/", "Search in file"), + ("n", "Next search match"), + ("N", "Previous search match"), + ("c", "Next change"), + ("C", "Previous change"), + ("d", "Toggle diff mode"), + ("a", "Toggle diff additions"), + ("x", "Toggle diff deletions"), + ("s", "Toggle sidebar"), + ("w", "Toggle line wrapping"), + ("L", "Toggle line numbers"), + ("q / Esc", "Quit"), + ("?", "Show/hide this help") + ] + # Calculate popup dimensions and position popup_width = 60 # Calculate height based on number of help items plus margins @@ -702,32 +728,6 @@ def draw_help_popup(stdscr, state): except curses.error: pass - # Define help content - help_items = [ - ("Navigation", ""), - ("j / Down", "Scroll down"), - ("k / Up", "Scroll up"), - ("Space / Page Down", "Page down"), - ("b / Page Up", "Page up"), - ("h / Left", "Focus left pane"), - ("l / Right", "Focus right pane"), - ("", ""), - ("Features", ""), - ("/", "Search in file"), - ("n", "Next search match"), - ("N", "Previous search match"), - ("c", "Next change"), - ("C", "Previous change"), - ("d", "Toggle diff mode"), - ("a", "Toggle diff additions"), - ("x", "Toggle diff deletions"), - ("s", "Toggle sidebar"), - ("w", "Toggle line wrapping"), - ("L", "Toggle line numbers"), - ("q / Esc", "Quit"), - ("?", "Show/hide this help") - ] - # Draw help content for i, (key, desc) in enumerate(help_items): y = popup_y + 2 + i