mirror of
https://github.com/dylanaraps/shfm.git
synced 2026-12-05 21:58:41 +00:00
working G/G scroll
This commit is contained in:
1 file changed
+6
-3
@@ -29,6 +29,9 @@ list_print() {
|
|||||||
i=1
|
i=1
|
||||||
end=$((bottom + 1))
|
end=$((bottom + 1))
|
||||||
|
|
||||||
|
[ "$y" -gt "$bottom" ] &&
|
||||||
|
shift "$((y - bottom))"
|
||||||
|
|
||||||
for file do
|
for file do
|
||||||
[ "$i" = "$y2" ] &&
|
[ "$i" = "$y2" ] &&
|
||||||
printf '\033[31;7m'
|
printf '\033[31;7m'
|
||||||
@@ -39,7 +42,7 @@ list_print() {
|
|||||||
i=$((i + 1))
|
i=$((i + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
printf '\033[%sH' "$y"
|
printf '\033[%sH' "$((y > bottom ? bottom : y))"
|
||||||
}
|
}
|
||||||
|
|
||||||
list_reset() {
|
list_reset() {
|
||||||
@@ -102,7 +105,7 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
print_line "$y" "$@"
|
print_line "$y" "$@"
|
||||||
status_line "$PWD (y:$y y2:$y2 #:$# bot:$bottom"
|
status_line
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -115,7 +118,7 @@ main() {
|
|||||||
printf '\n'
|
printf '\n'
|
||||||
print_line "$y" "$@"
|
print_line "$y" "$@"
|
||||||
|
|
||||||
status_line "$PWD (y:$y y2:$y2 #:$# bot:$bottom"
|
status_line
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user