fix spacing glitch on newline encounters
Akshay nerdypepper@tuta.io
Sun, 02 Feb 2020 22:41:45 +0530
1 files changed,
6 insertions(+),
1 deletions(-)
jump to
M
shlide
→
shlide
@@ -51,11 +51,16 @@
printf '\e[%s;%sH' "$l" "$c" while IFS= read -r line; do + reduce=0 # Print the contents of the slide file, # line by line. printf "%s" "$line" + case $line in + "" | *"\n"*) + ((++reduce));; + esac # Move down and back after each print. - printf '\e[%sD\e[B' "${#line}" + printf '\e[%sD\e[B' "$((${#line} - $reduce))" done <<< "$slide_contents" }