1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-14 14:07:30 +00:00

Merge branch 'main' of github.com:tw93/Mole

This commit is contained in:
Tw93
2025-12-20 22:30:36 +08:00
4 changed files with 6 additions and 6 deletions

View File

@@ -562,7 +562,7 @@ main() {
# Calculate name width: use actual max, but constrain by terminal width # Calculate name width: use actual max, but constrain by terminal width
# Fixed elements: "99. " (4) + " " (2) + " | Last: " (11) = 17 # Fixed elements: "99. " (4) + " " (2) + " | Last: " (11) = 17
local term_width=$(tput cols 2>/dev/null || echo 100) local term_width=$(tput cols 2> /dev/null || echo 100)
local available_for_name=$((term_width - 17 - max_size_width - max_last_width)) local available_for_name=$((term_width - 17 - max_size_width - max_last_width))
# Dynamic minimum for better spacing on wide terminals # Dynamic minimum for better spacing on wide terminals

View File

@@ -561,7 +561,7 @@ main() {
# Calculate name width: use actual max, but constrain by terminal width # Calculate name width: use actual max, but constrain by terminal width
# Fixed elements: "99. " (4) + " " (2) + " | Last: " (11) = 17 # Fixed elements: "99. " (4) + " " (2) + " | Last: " (11) = 17
local term_width=$(tput cols 2>/dev/null || echo 100) local term_width=$(tput cols 2> /dev/null || echo 100)
local available_for_name=$((term_width - 17 - max_size_width - max_last_width)) local available_for_name=$((term_width - 17 - max_size_width - max_last_width))
# Dynamic minimum for better spacing on wide terminals # Dynamic minimum for better spacing on wide terminals

View File

@@ -508,7 +508,7 @@ paginated_multi_select() {
# Normal: show full controls (without O ↑/↓ to save space) # Normal: show full controls (without O ↑/↓ to save space)
# Dynamically reduce controls if they won't fit # Dynamically reduce controls if they won't fit
local term_width="${COLUMNS:-}" local term_width="${COLUMNS:-}"
[[ -z "$term_width" ]] && term_width=$(tput cols 2>/dev/null || echo 80) [[ -z "$term_width" ]] && term_width=$(tput cols 2> /dev/null || echo 80)
# Helper to calculate display length without ANSI codes # Helper to calculate display length without ANSI codes
_calc_len() { _calc_len() {