yap-rawline 0.5.0 → 0.5.1

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: 13e2947b290e867550d30cacb28b8cf70896b796
4
- data.tar.gz: 7e29e206c43dca81525e1aee74015b8e85b234e5
3
+ metadata.gz: 21c58de0866271a9994af05648f35a469fa12fc8
4
+ data.tar.gz: fb7199d0dd979db6e7ca55a7999fe74a5c98fbb9
5
5
  SHA512:
6
- metadata.gz: 00af0143953fe8b96f103ddd0cdf07660a60883e29d873e7deff86ffe04134cede9f68b4c10af219156926da6581eaf06c5bae7bc133aad55b55efd0a840e2e2
7
- data.tar.gz: 646ec77535f43e27d829a38f8b98f5efe1c2f67f1b83a940714f6370cb4ca3dfd3c5a0e2d7b5aeef773f54031481836affb58064e16edb83c06a6b97021c3901
6
+ metadata.gz: 9c0680fb3b2323de92e914f7cf798e46f6e11c68ddcec6e04dd505d14fcb75eddbe71120e34483c6c2486933689ff3e8fa4524b84b488a2db5324ee9074df295
7
+ data.tar.gz: 00e4152cd8285b61aa5ec59fe9556179e14f9b7f9b2fd98b4ab3a6ce396c5f0a1cff1489b51ba8d55d7c1a24657c05cf473444d7b0ee1d664708f83877392742
@@ -252,7 +252,6 @@ module RawLine
252
252
 
253
253
  def read_bytes(bytes)
254
254
  return unless bytes.any?
255
- @renderer.pause
256
255
 
257
256
  Treefell['editor'].puts "read_bytes #{bytes.inspect}"
258
257
  old_position = @line.position
@@ -260,20 +259,22 @@ module RawLine
260
259
  key_code_sequences = parse_key_code_sequences(bytes)
261
260
 
262
261
  Treefell['editor'].puts "key code sequences: #{key_code_sequences.inspect}"
263
- key_code_sequences.each do |sequence|
264
- @char = sequence
265
- if @char == @terminal.keys[:enter] || !@char
266
- Treefell['editor'].puts "processing line: #{@line.text.inspect}"
267
- @renderer.pause
268
- process_line
269
- @renderer.unpause
270
- else
271
- process_character
272
- new_position = @line.position
262
+ begin
263
+ key_code_sequences.each do |sequence|
264
+ @char = sequence
265
+ if @char == @terminal.keys[:enter] || !@char
266
+ Treefell['editor'].puts "processing line: #{@line.text.inspect}"
267
+
268
+ @renderer.pause
269
+ process_line
270
+ else
271
+ process_character
272
+ new_position = @line.position
273
+ end
273
274
  end
275
+ ensure
276
+ @renderer.unpause
274
277
  end
275
- ensure
276
- @renderer.unpause
277
278
  end
278
279
 
279
280
  def process_line
@@ -25,9 +25,12 @@ module RawLine
25
25
  end
26
26
 
27
27
  def render(reset: false)
28
- Treefell['editor'].puts "#{self.class}##{__callee__} reset=#{reset}"
28
+ Treefell['editor'].puts %|#{self.class}##{__callee__} reset=#{reset}}|
29
29
  if @paused
30
30
  Treefell['editor'].puts " paused"
31
+ if @render_on_unpause_kwargs && @render_on_unpause_kwargs[:reset]
32
+ reset = true
33
+ end
31
34
  @render_on_unpause_kwargs = {reset: reset}
32
35
  else
33
36
  Treefell['editor'].puts " unpaused"
@@ -1,3 +1,3 @@
1
1
  module RawLine
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yap-rawline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Cevasco