reline 0.4.0 → 0.5.0.pre.1

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.
@@ -1,3 +1,3 @@
1
1
  module Reline
2
- VERSION = '0.4.0'
2
+ VERSION = '0.5.0.pre.1'
3
3
  end
data/lib/reline.rb CHANGED
@@ -278,8 +278,12 @@ module Reline
278
278
  Reline::HISTORY << whole_buffer
279
279
  end
280
280
 
281
- line_editor.reset_line if line_editor.whole_buffer.nil?
282
- whole_buffer
281
+ if line_editor.eof?
282
+ line_editor.reset_line
283
+ nil
284
+ else
285
+ whole_buffer
286
+ end
283
287
  end
284
288
  end
285
289
 
@@ -326,7 +330,7 @@ module Reline
326
330
  line_editor.prompt_proc = prompt_proc
327
331
  line_editor.auto_indent_proc = auto_indent_proc
328
332
  line_editor.dig_perfect_match_proc = dig_perfect_match_proc
329
- line_editor.pre_input_hook = pre_input_hook
333
+ pre_input_hook&.call
330
334
  @dialog_proc_list.each_pair do |name_sym, d|
331
335
  line_editor.add_dialog_proc(name_sym, d.dialog_proc, d.context)
332
336
  end
@@ -337,6 +341,7 @@ module Reline
337
341
  io_gate.set_default_key_bindings(config)
338
342
  end
339
343
 
344
+ line_editor.print_nomultiline_prompt(prompt)
340
345
  line_editor.rerender
341
346
 
342
347
  begin
@@ -346,10 +351,8 @@ module Reline
346
351
  prev_pasting_state = io_gate.in_pasting?
347
352
  read_io(config.keyseq_timeout) { |inputs|
348
353
  line_editor.set_pasting_state(io_gate.in_pasting?)
349
- inputs.each { |c|
350
- line_editor.input_key(c)
351
- line_editor.rerender
352
- }
354
+ inputs.each { |c| line_editor.update(c) }
355
+ line_editor.rerender
353
356
  if @bracketed_paste_finished
354
357
  line_editor.rerender_all
355
358
  @bracketed_paste_finished = false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - aycabta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-07 00:00:00.000000000 Z
11
+ date: 2023-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: io-console
@@ -69,11 +69,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
69
  version: '2.6'
70
70
  required_rubygems_version: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ">="
72
+ - - ">"
73
73
  - !ruby/object:Gem::Version
74
- version: '0'
74
+ version: 1.3.1
75
75
  requirements: []
76
- rubygems_version: 3.5.0.dev
76
+ rubygems_version: 3.4.10
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Alternative GNU Readline or Editline implementation by pure Ruby.