From 1507cb084cebdeb4d7f298e1ff677135b13d85ef Mon Sep 17 00:00:00 2001 From: aycabta 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(-) (limited to 'lib/irb/input-method.rb') 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 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.3