reline 0.4.3 → 0.5.0.pre.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Reline
2
- VERSION = '0.4.3'
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.3
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: 2024-02-25 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
@@ -57,10 +57,7 @@ files:
57
57
  homepage: https://github.com/ruby/reline
58
58
  licenses:
59
59
  - Ruby
60
- metadata:
61
- bug_tracker_uri: https://github.com/ruby/reline/issues
62
- changelog_uri: https://github.com/ruby/reline/releases
63
- source_code_uri: https://github.com/ruby/reline
60
+ metadata: {}
64
61
  post_install_message:
65
62
  rdoc_options: []
66
63
  require_paths:
@@ -72,11 +69,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
72
69
  version: '2.6'
73
70
  required_rubygems_version: !ruby/object:Gem::Requirement
74
71
  requirements:
75
- - - ">="
72
+ - - ">"
76
73
  - !ruby/object:Gem::Version
77
- version: '0'
74
+ version: 1.3.1
78
75
  requirements: []
79
- rubygems_version: 3.5.1
76
+ rubygems_version: 3.4.10
80
77
  signing_key:
81
78
  specification_version: 4
82
79
  summary: Alternative GNU Readline or Editline implementation by pure Ruby.