summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-10-08 10:26:23 +0900
committergit <svn-admin@ruby-lang.org>2021-10-08 10:34:06 +0900
commit1507cb084cebdeb4d7f298e1ff677135b13d85ef (patch)
treef6c70bdbec290e8dc63cc84ab6770953f9e0ecc5
parent576eccf76de65828e7c68960f59b855f32093ee0 (diff)
[ruby/irb] Determine left and right when the width of either side is zero correctly
https://github.com/ruby/irb/commit/5df6e1f027
-rw-r--r--lib/irb/input-method.rb4
1 files 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
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.