Skip to content

Commit

Permalink
Tweak delay when opening a single directory
Browse files Browse the repository at this point in the history
  • Loading branch information
josephschmitt committed Feb 12, 2025
1 parent 3326108 commit e5c63fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/zide-edit
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ if [ ! -f "${path}" ] && [ ${#paths[@]} -eq 1 ]; then

# The longer the path string, the longer we need to wait so that zellij has time to write out
# the path before moving on. Through some trial and error, I found that dividing the length by
# 250 gives it sufficient time to get through it. Calculating this based on string length vs
# 150 gives it sufficient time to get through it. Calculating this based on string length vs
# a static value makes sure we don't end up with a long wait time for short paths that don't
# need to wait as long.
sleep $(echo "${#path} / 250" | bc -l)
sleep $(echo "${#path} / 150" | bc -l)
fi

# Open paths in the editor
Expand Down

0 comments on commit e5c63fc

Please sign in to comment.