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

ruby-changes:67368

From: aycabta <ko1@a...>
Date: Tue, 31 Aug 2021 05:25:11 +0900 (JST)
Subject: [ruby-changes:67368] c63d98b401 (master): [ruby/irb] Use DialogRenderInfo

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

From c63d98b40135a6e4605d35a0fb014c2f3143e38f Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Tue, 31 Aug 2021 04:25:23 +0900
Subject: [ruby/irb] Use DialogRenderInfo

https://github.com/ruby/irb/commit/5bc3a72ca3
---
 lib/irb/input-method.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index b28dede..911416a 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -359,7 +359,9 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/input-method.rb#L359
       formatter.width = 40
       str = doc.accept(formatter)
 
-      [Reline::CursorPos.new(cursor_pos_to_render.x + 40, cursor_pos_to_render.y + pointer), str.split("\n"), nil, '49']
+      x = cursor_pos_to_render.x + 40
+      y = cursor_pos_to_render.y + pointer - dialog.scroll_top
+      DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: str.split("\n"), bg_color: '49')
     }
 
     # Reads the next line from this input method.
-- 
cgit v1.1


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

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