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

ruby-changes:68308

From: aycabta <ko1@a...>
Date: Fri, 8 Oct 2021 10:34:24 +0900 (JST)
Subject: [ruby-changes:68308] 1507cb084c (master): [ruby/irb] Determine left and right when the width of either side is zero correctly

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

From 1507cb084cebdeb4d7f298e1ff677135b13d85ef Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Fri, 8 Oct 2021 10:26:23 +0900
Subject: [ruby/irb] Determine left and right when the width of either side is
 zero correctly

https://github.com/ruby/irb/commit/5df6e1f027
---
 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 49c52bd8da..5efd5d8e21 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -381,10 +381,10 @@ module IRB https://github.com/ruby/ruby/blob/trunk/lib/irb/input-method.rb#L381
             width = left_width
             x = left_x
           end
-        elsif right_width.positive? and left_width.negative?
+        elsif right_width.positive? and left_width <= 0
           width = right_width
           x = right_x
-        elsif right_width.negative? and left_width.positive?
+        elsif right_width <= 0 and left_width.positive?
           width = left_width
           x = left_x
         else # Both are negative width.
-- 
cgit v1.2.1


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

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