@@ -501,24 +501,24 @@ def _update_table(self, table_id: str, items: List[FileInfo]) -> None:
501
501
# Calculate how many items we can display based on available screen space
502
502
# Get the current screen size
503
503
screen_height = self .size .height if hasattr (self , 'size' ) else 24 # Default to 24 if size not available
504
-
504
+
505
505
# Estimate space needed for other UI elements (headers, footers, etc.)
506
506
# Header (1) + Title (1) + Status bar (1) + Section headers (2) + Footer (1) = ~6 lines
507
507
other_ui_elements = 6
508
-
508
+
509
509
# Each table gets roughly half of the remaining space
510
510
available_height_per_table = max (5 , (screen_height - other_ui_elements ) // 2 )
511
-
511
+
512
512
# Determine max items to display - use the greater of:
513
513
# 1. User-specified max (from options)
514
514
# 2. Available height based on screen size
515
515
max_items = available_height_per_table
516
-
516
+
517
517
if table_id == "#files-table" :
518
518
user_max = getattr (self .options , 'user_max_files' , self .options .max_files )
519
519
else : # dirs-table
520
520
user_max = getattr (self .options , 'user_max_dirs' , self .options .max_dirs )
521
-
521
+
522
522
# Use the larger of calculated max or user-specified max
523
523
max_items = max (user_max , max_items )
524
524
@@ -800,9 +800,9 @@ def run_textual_ui(
800
800
# The UI will limit display based on screen size and user preferences
801
801
scanner_max_files = 1000 # Collect up to 1000 files
802
802
scanner_max_dirs = 1000 # Collect up to 1000 directories
803
-
803
+
804
804
options = ScanOptions (max_files = scanner_max_files , max_dirs = scanner_max_dirs , skip_dirs = skip_dirs )
805
-
805
+
806
806
# Store user preferences for UI display
807
807
options .user_max_files = max_files
808
808
options .user_max_dirs = max_dirs
0 commit comments