irb 1.3.8.pre.4 → 1.3.8.pre.5

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: 1373231cc70b1b86ba8a0fc990fb45c4d2790914f27c1055ccf034e555aea55c
4
- data.tar.gz: 7451c4a722684f4d265d9fc7dc408b765dba980fb169a0f72a9aa469df1ce9ed
3
+ metadata.gz: d29a3a6c94d71c5b11b5f946244793454141aaefd087bc2c8a9f45ad099e081a
4
+ data.tar.gz: d0a9f1094a170721582e33fab6c9d2b3ee26e4c169d0355da606d76d1efaa9a7
5
5
  SHA512:
6
- metadata.gz: 766139b77dd400d4df26e471587f82b8e37c98aa75ef8701cb0c89a4b81c081ece91bc8fcb7bc9a1ad6ced8d1d249ed688089878824b90383f3a07cf09aa12cc
7
- data.tar.gz: eb003c7fcf1f5801f6da77f8535122d4f881d2f85abd0ee7c226f937ab84b3a24a8a8f21864696dfdcbe3d29d491b444a3cb67524192d3202e747f63bf6652f8
6
+ metadata.gz: 350ea1c51a7674cac7421a4b23a8e4614c76a5f40bad5a72170ac51b5f78ca98c1414730d885bc2f55cd94d9b5244d154d7258f9c64bd87a522ed2eb36ff38ea
7
+ data.tar.gz: 5a345350ec713e070693266317fe97d79f2fea3497ff7085f1c3cac9ce791827eab920081d7f48f5223da0fdd82b521c9ea1a1d3a6ba4e4c4ead631c16796cda
data/irb.gemspec CHANGED
@@ -36,5 +36,5 @@ Gem::Specification.new do |spec|
36
36
 
37
37
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5")
38
38
 
39
- spec.add_dependency "reline", ">= 0.2.8.pre.4"
39
+ spec.add_dependency "reline", ">= 0.2.8.pre.5"
40
40
  end
@@ -322,7 +322,7 @@ module IRB
322
322
  if just_cursor_moving and completion_journey_data.nil?
323
323
  return nil
324
324
  end
325
- cursor_pos_to_render, result, pointer, dialog = context.pop(4)
325
+ cursor_pos_to_render, result, pointer, autocomplete_dialog = context.pop(4)
326
326
  return nil if result.nil? or pointer.nil? or pointer < 0
327
327
  name = result[pointer]
328
328
  name = IRB::InputCompletor.retrieve_completion_data(name, doc_namespace: true)
@@ -355,13 +355,15 @@ module IRB
355
355
  end
356
356
  end
357
357
  return nil if doc.nil?
358
+ width = 40
358
359
  formatter = RDoc::Markup::ToAnsi.new
359
- formatter.width = 40
360
- str = doc.accept(formatter)
360
+ formatter.width = width
361
+ contents = doc.accept(formatter).split("\n")
361
362
 
362
- x = cursor_pos_to_render.x + 40
363
- y = cursor_pos_to_render.y + pointer - dialog.scroll_top
364
- DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: str.split("\n"), bg_color: '49')
363
+ x = cursor_pos_to_render.x + autocomplete_dialog.width
364
+ x = cursor_pos_to_render.x - width if x + width >= screen_width
365
+ y = cursor_pos_to_render.y + pointer - autocomplete_dialog.scroll_top
366
+ DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: contents, width: width, bg_color: '49')
365
367
  }
366
368
 
367
369
  # Reads the next line from this input method.
data/lib/irb/version.rb CHANGED
@@ -11,7 +11,7 @@
11
11
  #
12
12
 
13
13
  module IRB # :nodoc:
14
- VERSION = "1.3.8.pre.4"
14
+ VERSION = "1.3.8.pre.5"
15
15
  @RELEASE_VERSION = VERSION
16
16
  @LAST_UPDATE_DATE = "2021-08-31"
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.8.pre.4
4
+ version: 1.3.8.pre.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keiju ISHITSUKA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-30 00:00:00.000000000 Z
11
+ date: 2021-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reline
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.8.pre.4
19
+ version: 0.2.8.pre.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.8.pre.4
26
+ version: 0.2.8.pre.5
27
27
  description: Interactive Ruby command-line tool for REPL (Read Eval Print Loop).
28
28
  email:
29
29
  - keiju@ruby-lang.org