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

ruby-changes:67551

From: aycabta <ko1@a...>
Date: Thu, 2 Sep 2021 17:11:21 +0900 (JST)
Subject: [ruby-changes:67551] a44d28db9f (master): [ruby/reline] Fix a misalignment when dialog is shown on top

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

From a44d28db9f2c8d3fd82314e59b96f2e69aa16283 Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Thu, 2 Sep 2021 16:15:48 +0900
Subject: [ruby/reline] Fix a misalignment when dialog is shown on top

https://github.com/ruby/reline/commit/0527b1a492
---
 lib/reline/line_editor.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 70b1183..4f89e37 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -632,7 +632,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L632
     if (lower_space + @rest_height - dialog_render_info.pos.y) >= height
       dialog.vertical_offset = dialog_render_info.pos.y + 1
     elsif upper_space >= height
-      dialog.vertical_offset = dialog_render_info.pos.y + -(height + 1)
+      dialog.vertical_offset = dialog_render_info.pos.y - height
     else
       if (lower_space + @rest_height - dialog_render_info.pos.y) < height
         scroll_down(height + dialog_render_info.pos.y)
-- 
cgit v1.1


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

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