mirror of
https://github.com/tw93/Mole.git
synced 2026-02-15 02:20:08 +00:00
Optimize the key usage experience
This commit is contained in:
@@ -27,21 +27,6 @@ _pm_parse_csv_to_array() {
|
||||
done
|
||||
}
|
||||
|
||||
# Non-blocking input drain (bash 3.2) - improved for mouse wheel
|
||||
drain_pending_input() {
|
||||
local _k drained=0
|
||||
# Multiple passes to handle mouse wheel burst sequences
|
||||
while IFS= read -r -s -n 1 -t 0.01 _k 2> /dev/null; do
|
||||
((drained++))
|
||||
[[ $drained -gt 1000 ]] && break
|
||||
done
|
||||
# Second pass with shorter timeout
|
||||
while IFS= read -r -s -n 1 -t 0.001 _k 2> /dev/null; do
|
||||
((drained++))
|
||||
[[ $drained -gt 1500 ]] && break
|
||||
done
|
||||
}
|
||||
|
||||
# Main paginated multi-select menu function
|
||||
paginated_multi_select() {
|
||||
local title="$1"
|
||||
|
||||
Reference in New Issue
Block a user