fix: Move help_items definition to resolve popup rendering issue

This commit is contained in:
n loewen (aider) 2025-06-08 02:59:09 +01:00
parent ecce880cdb
commit 26a10c5dbc
1 changed files with 26 additions and 26 deletions

52
gtm
View File

@ -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