1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-15 19:15:04 +00:00

Complete automated testing

This commit is contained in:
Tw93
2025-10-12 15:43:45 +08:00
parent f9a93f6052
commit 3c56fe0633
13 changed files with 484 additions and 198 deletions

View File

@@ -262,14 +262,8 @@ EOF
fi
done
if [[ ${#selected_indices[@]} -eq 0 ]]; then
local default_idx=$((top_index + cursor_pos))
if [[ $default_idx -ge 0 && $default_idx -lt $total_items ]]; then
selected[default_idx]=true
selected_indices=("$default_idx")
fi
fi
# Allow empty selection - don't auto-select cursor position
# This fixes the bug where unselecting all items would still select the last cursor position
local final_result=""
if [[ ${#selected_indices[@]} -gt 0 ]]; then
local IFS=','