[前][次][番号順一覧][スレッド一覧]

ruby-changes:67385

From: aycabta <ko1@a...>
Date: Tue, 31 Aug 2021 15:20:26 +0900 (JST)
Subject: [ruby-changes:67385] cf0ece810a (master): [ruby/irb] Rename a variable "dialog" with "autocomplete_dialog"

https://git.ruby-lang.org/ruby.git/commit/?id=cf0ece810a

From cf0ece810a72157437a76679bf22f7856afc16ca Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Tue, 31 Aug 2021 05:50:15 +0900
Subject: [ruby/irb] Rename a variable "dialog" with "autocomplete_dialog"

Because it's just used to receive data from the autocomplete dialog, not
for show doc dialog.

https://github.com/ruby/irb/commit/f8b752bd98
---
 lib/irb/input-method.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index 911416a..f7a4fba 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -322,7 +322,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/input-method.rb#L322
       if just_cursor_moving and completion_journey_data.nil?
         return nil
       end
-      cursor_pos_to_render, result, pointer, dialog = context.pop(4)
+      cursor_pos_to_render, result, pointer, autocomplete_dialog = context.pop(4)
       return nil if result.nil? or pointer.nil? or pointer < 0
       name = result[pointer]
       name = IRB::InputCompletor.retrieve_completion_data(name, doc_namespace: true)
@@ -360,7 +360,7 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/input-method.rb#L360
       str = doc.accept(formatter)
 
       x = cursor_pos_to_render.x + 40
-      y = cursor_pos_to_render.y + pointer - dialog.scroll_top
+      y = cursor_pos_to_render.y + pointer - autocomplete_dialog.scroll_top
       DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: str.split("\n"), bg_color: '49')
     }
 
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]