Skip to content

Commit

Permalink
Improve _spinner() behavior.
Browse files Browse the repository at this point in the history
refs gh-269
  • Loading branch information
xwmx committed Sep 2, 2023
1 parent bf81695 commit 0875691
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions nb
Original file line number Diff line number Diff line change
Expand Up @@ -3299,19 +3299,14 @@ _spinner() {
"${_TPUT_SETAF_8}" \
"${_TPUT_SGR0}"

printf "\b\b\b\b\b\b\b\b"

This comment has been minimized.

Copy link
@eblume

eblume Sep 2, 2023

I will give this a try, thank you. I'm starting to wonder if the root if this issue is just that it should have been seven backspaces and not eight, though? Perhaps a missed space after the ellipses? But if your new logic fixes it, great. Thanks again for the help.

printf "\b\b\b\b"
fi

sleep ${_delay}

_spin_string="${_temp}${_spin_string%"${_temp}"}"
done

if ((_COLOR_ENABLED))
then
printf " \b\b\b\b\b\b\b\b"
fi

return 0
}

Expand Down Expand Up @@ -3680,7 +3675,7 @@ _git() {

if ((NB_AUTO_SYNC))
then
(
( sleep 2
{
# only commit when the index is dirty
if _git dirty "${_notebook_path}"
Expand All @@ -3690,7 +3685,7 @@ _git() {
} || :
) &
else
(
( sleep 2
_git_checkpoint_commit "${_notebook_path}" "${_message}" &>/dev/null ||
return 0
) &
Expand Down

0 comments on commit 0875691

Please sign in to comment.