rubytext 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f1f66253898628d0de61033adc7f68272464aac892e0df3a2a08f3ffb046c7a
4
- data.tar.gz: 452bc1908cfd5b63d9c7c2afcd08f3a6839ccc3395aabdf44f39b164606e7229
3
+ metadata.gz: 40ae374b8ab09a409ec29a96a6c97859c5ada588895bd300b5cb3cb37830aac2
4
+ data.tar.gz: ac7aa21bb49796700d0d56d5283507ba50c69b0534314bbd8711984655e8f5b2
5
5
  SHA512:
6
- metadata.gz: a694ac3c9c128038b17d6020d6e440a48cabc67969db9f0ba3eb107e19a0460b4b7eb52c4c457b42915eb082f55847e216245ed8f49357e36520118a21253768
7
- data.tar.gz: d80a126d0c56ac7deda93931e670c4148fda63f0d9233486558bb1dfb9da25b76a7b1f6fbee197db3ec53308fb25c3d5b353615718294033e3e69b449051fd2f
6
+ metadata.gz: 8c0ca81a6f7baf84ed7d922efbbf1f40e0d7b5c87ffd161d4515e1ecb1c576e48b67b8faecc4de6a4ab5720cef9d190133c272e00f8c5585f21d307aa228aee4
7
+ data.tar.gz: 743ada491e04f00f51a6d1c287be606474549e071bda25edb64d2e7d088f3eaaec0d8d622c1d3153964d486f8b122f16589f01b93aceac86875dad3c0d5da645
data/lib/output.rb CHANGED
@@ -145,6 +145,8 @@ class RubyText::Window
145
145
  @limit = limit || (@win.cols - @r0 - 1)
146
146
  raise ArgumentError unless @limit.is_a?(Numeric)
147
147
  @str, @i = str[0..(@limit-1)], i
148
+ @win.print @str
149
+ @win.left @str.length
148
150
  @history = history
149
151
  @h = @history.length - 1
150
152
  @maxlen = 0 # longest string in history
@@ -219,10 +221,10 @@ class RubyText::Window
219
221
  end
220
222
  end
221
223
 
222
- def gets(history: [], limit: nil) # still needs improvement
224
+ def gets(history: [], limit: nil, default: "") # still needs improvement
223
225
  # echo assumed to be OFF, keypad ON
224
226
  @history = history
225
- gs = GetString.new(self, history: history, limit: limit)
227
+ gs = GetString.new(self, default, history: history, limit: limit)
226
228
  loop do
227
229
  ch = self.getch
228
230
  case ch
@@ -1,6 +1,6 @@
1
1
 
2
2
  module RubyText
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubytext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hal Fulton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-07 00:00:00.000000000 Z
11
+ date: 2019-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses