Skip to content

Commit aa59077

Browse files
authored
Merge pull request #34 from iamjamestl/fix-bash-range
Fix bash range in get_repeated_scroll_cmd function.
2 parents c0060ad + 9a3a903 commit aa59077

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scroll_copy_mode.tmux

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ get_repeated_scroll_cmd() {
1515
local scroll_speed_num_lines_per_scroll=$(get_tmux_option "$scroll_speed_num_lines_per_scroll_option" "3")
1616
local cmd=""
1717
if echo - | awk "{ if ($scroll_speed_num_lines_per_scroll >= 1) { exit 0 } else { exit 1 } }" ; then # Positive whole number speed (round down).
18-
for i in {1.."$scroll_speed_num_lines_per_scroll"} ; do
18+
for ((i = 1; i <= scroll_speed_num_lines_per_scroll; i++)); do
1919
cmd=$cmd"send-keys $1 ; "
2020
done
2121
elif echo - | awk "{ if ($scroll_speed_num_lines_per_scroll > 0) { exit 0 } else { exit 1 } }" ; then # Positive decimal between 0 and 1 (treat as percent).

0 commit comments

Comments
 (0)