Calculate menu location from slide no
This commit is contained in:
@@ -98,7 +98,8 @@ while true
|
|||||||
do
|
do
|
||||||
# print slide $i
|
# print slide $i
|
||||||
NO_SLIDES=$( grep -ce "^# " "$1" )
|
NO_SLIDES=$( grep -ce "^# " "$1" )
|
||||||
COLS=$(( $( tput cols ) - 3 ))
|
SLIDE_CHARS=$(( ${#i} + ${#NO_SLIDES} +1 ))
|
||||||
|
COLS=$(( $( tput cols ) - $SLIDE_CHARS ))
|
||||||
[ "$cmd" = "e" ] && read -N 1 foo
|
[ "$cmd" = "e" ] && read -N 1 foo
|
||||||
display_slide "$1" $i
|
display_slide "$1" $i
|
||||||
# save cursor location
|
# save cursor location
|
||||||
|
|||||||
Reference in New Issue
Block a user