Browse Source

more POSIX

main
deicidus 2 years ago
parent
commit
d6056878e3
  1. 4
      spells/cantrips/fathom-cursor

4
spells/cantrips/fathom-cursor

@ -17,11 +17,13 @@ fathom_cursor() {
done done
# Get the position of the cursor # Get the position of the cursor
stty -echo
printf "\033[6n" printf "\033[6n"
while IFS=';' read -r -d R ROW COL; do while IFS=';' read -r -d R ROW COL; do
break break
done done
position=$(printf "%s;%s" "${ROW#*[}" "${COL%%R*}") stty echo
position=$(printf "%s;%s" "${COL%%R*}" "${ROW#*[}")
if [ $x = true ] && [ $y = true ]; then if [ $x = true ] && [ $y = true ]; then
if [ $verbose = true ]; then if [ $verbose = true ]; then

Loading…
Cancel
Save