fix: Dynamically calculate help popup height to show all help items

This commit is contained in:
n loewen (aider) 2025-06-08 02:54:19 +01:00
parent a66b06daab
commit 4e07164bdc
1 changed files with 2 additions and 1 deletions

3
gtm
View File

@ -655,7 +655,8 @@ def draw_help_popup(stdscr, state):
# Calculate popup dimensions and position # Calculate popup dimensions and position
popup_width = 60 popup_width = 60
popup_height = 20 # Calculate height based on number of help items plus margins
popup_height = len(help_items) + 5 # 5 extra lines for borders, title, and footer
popup_x = max(0, (state.width - popup_width) // 2) popup_x = max(0, (state.width - popup_width) // 2)
popup_y = max(0, (state.height - popup_height) // 2) popup_y = max(0, (state.height - popup_height) // 2)