1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-06 16:37:57 +00:00
This commit is contained in:
Tw93
2025-11-15 10:01:21 +08:00
parent 72caed7da2
commit 1cb87c67e8
5 changed files with 8 additions and 8 deletions

View File

@@ -296,7 +296,7 @@ read_key() {
$'\x7f' | $'\x08') echo "DELETE" ;; # Backspace/Delete key
$'\x1b')
# ESC sequence - could be arrow key, delete key, or ESC alone
# Read the next two bytes within 1s
# Read the next bytes with 1s timeout for maximum compatibility
if IFS= read -r -s -n 1 -t 1 rest 2> /dev/null; then
if [[ "$rest" == "[" ]]; then
# Got ESC [, read next character

View File

@@ -461,7 +461,7 @@ paginated_multi_select() {
"${GRAY}${ICON_NAV_UP}/${ICON_NAV_DOWN}${NC} Navigate"
"${GRAY}Space${NC} Select"
"${GRAY}Enter${NC} Confirm"
"${GRAY}Q/ESC${NC} Quit"
"${GRAY}Q${NC} Quit"
)
_print_wrapped_controls "$sep" "${_segs_basic[@]}"
local -a _segs_advanced=(
@@ -477,7 +477,7 @@ paginated_multi_select() {
"${GRAY}Space${NC} Select"
"${GRAY}Enter${NC} Confirm"
"${GRAY}/${NC} Filter"
"${GRAY}Q/ESC${NC} Quit"
"${GRAY}Q${NC} Quit"
)
_print_wrapped_controls "$sep" "${_segs_simple[@]}"
fi

View File

@@ -124,7 +124,7 @@ paginated_multi_select() {
if [[ $total_items -eq 0 ]]; then
printf "${clear_line}${GRAY}No items available${NC}\n" >&2
printf "${clear_line}\n" >&2
printf "${clear_line}${GRAY}Q/ESC${NC} Quit\n" >&2
printf "${clear_line}${GRAY}Q${NC} Quit\n" >&2
printf "${clear_line}" >&2
return
fi
@@ -168,7 +168,7 @@ paginated_multi_select() {
# Clear any remaining lines at bottom
printf "${clear_line}\n" >&2
printf "${clear_line}${GRAY}${ICON_NAV_UP}/${ICON_NAV_DOWN}${NC} Navigate ${GRAY}|${NC} ${GRAY}Space${NC} Select ${GRAY}|${NC} ${GRAY}Enter${NC} Confirm ${GRAY}|${NC} ${GRAY}Q/ESC${NC} Quit\n" >&2
printf "${clear_line}${GRAY}${ICON_NAV_UP}/${ICON_NAV_DOWN}${NC} Navigate ${GRAY}|${NC} ${GRAY}Space${NC} Select ${GRAY}|${NC} ${GRAY}Enter${NC} Confirm ${GRAY}|${NC} ${GRAY}Q${NC} Quit\n" >&2
# Clear one more line to ensure no artifacts
printf "${clear_line}" >&2