working G/G scroll

This commit is contained in:
Dylan Araps committed 2020-08-03 22:17:36 +03:00
1 parent 289f119b17
commit 6b2f9f880b
1 file changed
+6 -3
+6 -3
View File
@@ -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
} }
;; ;;