rubytext 0.1.14 → 0.1.15

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
  SHA256:
3
- metadata.gz: 5edfad72caf19e2e70c17c0abd239a2a563f29db90d7bf46afda16c7d3660f66
4
- data.tar.gz: a6736885d763fc52c8ce5f25da49365e144949fda7a4e4943c82c4fe40869496
3
+ metadata.gz: 49416eeeedcf525d20342ca140b560f2fd8770ff42992aad97469912a6bccd75
4
+ data.tar.gz: 12504d67952db3c24e0e8a0c1abf5c7b3e8c2e2fb72aaa2bbb2ae94ba81e1634
5
5
  SHA512:
6
- metadata.gz: c3d1eb8234d2a1ac623570647abcd1e729047c5e4b3511664f6e825cf470221903c1d9471813f36439c24c07f1cb2c0592e5ccb0ddf986893e5f23cd98b48177
7
- data.tar.gz: 15570d3cd19c82f16df066652f82a5df07824fd7805c54aac2ddbc4b361be24969a718cdc967fd86f0c0d7c80a9aca2d28e8b99a1277eed58ffa3f94062574d0
6
+ metadata.gz: ac995d489efa96c76503602b18e7b9c09fb00bd631cee736f45def2b503408f7079b45d07b897ebf9c712f4684b62bca1884d9444801f832cf86f1d075c8998d
7
+ data.tar.gz: 758a5ea337c92e8221527c55cfd8c66d798d818895db45a1c7297a2ca58834c93bf484cf442831b105ba0507538872218574d537a6f11968b3058602d0502e1e
data/lib/output.rb CHANGED
@@ -145,6 +145,7 @@ 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
+ @str ||= ""
148
149
  @win.print @str
149
150
  @win.left @str.length
150
151
  @history = history
@@ -217,7 +218,7 @@ class RubyText::Window
217
218
  else
218
219
  target = targets.first
219
220
  end
220
- @str = target.dup
221
+ @str = target.nil? ? "" : target.dup
221
222
  @i = @str.length
222
223
  @win.go @r0, @c0
223
224
  @win.print @str
@@ -263,6 +264,9 @@ class RubyText::Window
263
264
  when 258 # down
264
265
  next if @history.nil? # move this?
265
266
  gs.history_next
267
+ when 27 # escape
268
+ gs.enter
269
+ break
266
270
  when Integer
267
271
  Curses.beep
268
272
  else
@@ -1,6 +1,6 @@
1
1
 
2
2
  module RubyText
3
- VERSION = "0.1.14"
3
+ VERSION = "0.1.15"
4
4
 
5
5
  Path = File.expand_path(File.join(File.dirname(__FILE__)))
6
6
  end
data/lib/settings.rb CHANGED
@@ -90,7 +90,7 @@ File.open("/tmp/dammit2", "w") {|f| f.puts "-- list = #{list.inspect}" }
90
90
 
91
91
  def self.start(*args, log: "/tmp/rubytext.log",
92
92
  fg: White, bg: Blue, scroll: false)
93
- # $debug ||= File.new(log, "w") if log # FIXME remove global
93
+ $debug ||= File.new(log, "w") if log # FIXME remove global
94
94
 
95
95
  args.each {|arg| raise "#{arg} is not valid" unless Settings::ValidArgs.include?(arg) }
96
96
  raise RTError("#{fg} is not a color") unless ::Colors.include? fg
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.14
4
+ version: 0.1.15
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-23 00:00:00.000000000 Z
11
+ date: 2019-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: curses