fancy_gets 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fancy_gets/version.rb +1 -1
- data/lib/fancy_gets.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85562fc1f81a32285fc7ba1c55fddab5c682788c
|
4
|
+
data.tar.gz: 7efd1dc42d0d741651089706c1afcf2b3103dbe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3050f1d78127a725ce2fe2cd83129ca4334e215e93a76388ac1c87ac8842a874a70bda4cddc4194b4eb642598f85a46a940be38abde99bd25d773c78988476cb
|
7
|
+
data.tar.gz: 72c1fa9893d5fe8021f203df3883c2beb0d9a1eafc1719f3c5a4d0a031d9ce6862661b640c05a0e3d25669632a3f0f151d69a2f9ce6f2042ac022d6afd2a52bd
|
data/lib/fancy_gets/version.rb
CHANGED
data/lib/fancy_gets.rb
CHANGED
@@ -115,8 +115,8 @@ module FancyGets
|
|
115
115
|
puts "#{" " * uncolor.call(prefix).length}#{"↓" * max_word_length}" if height < words.length
|
116
116
|
|
117
117
|
info ||= "Use arrow keys#{is_multiple ? ", spacebar to toggle, and ENTER to save" : " and ENTER to make a choice"}"
|
118
|
-
# %%% used to be (words.length - position)
|
119
|
-
print info + (27.chr + 91.chr + 65.chr) * (height - (position - (offset || 0)) - (
|
118
|
+
# %%% used to be (words.length - position), and then (last_word <= words.length)
|
119
|
+
print info + (27.chr + 91.chr + 65.chr) * (height - (position - (offset || 0)) - (height < words.length ? 1 : 0))
|
120
120
|
# To end of text on starting line
|
121
121
|
info_length = uncolor.call(info).length
|
122
122
|
word_length = uncolor.call(words[position]).length + pre_post_length
|