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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a874e5d77d0776b33016f748e58ea654146a3008
4
- data.tar.gz: a18267ee4b5ec4e0292b17545ccfebc880561466
3
+ metadata.gz: 85562fc1f81a32285fc7ba1c55fddab5c682788c
4
+ data.tar.gz: 7efd1dc42d0d741651089706c1afcf2b3103dbe3
5
5
  SHA512:
6
- metadata.gz: 4c1a9f82173ba9f6d3470b2ca59912b394a232a56b7c203164a0acbae3674bf2d6325cc477d1120fd64d020cf02654d0a15a03b267330775dbc763025ded5829
7
- data.tar.gz: 8d075d38ec64b686532ac8ce1402762bc23b1c0058d58c1494035824bbadccb6309cd44d235d9acde81b40dce5bd7d55d43314a5ed5cb1da8e27dfea10547d29
6
+ metadata.gz: 3050f1d78127a725ce2fe2cd83129ca4334e215e93a76388ac1c87ac8842a874a70bda4cddc4194b4eb642598f85a46a940be38abde99bd25d773c78988476cb
7
+ data.tar.gz: 72c1fa9893d5fe8021f203df3883c2beb0d9a1eafc1719f3c5a4d0a031d9ce6862661b640c05a0e3d25669632a3f0f151d69a2f9ce6f2042ac022d6afd2a52bd
@@ -1,3 +1,3 @@
1
1
  module FancyGets
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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)) - (last_word <= words.length ? 1 : 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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fancy_gets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lorin Thwaits