summaryrefslogtreecommitdiff
path: root/lib/irb/input-method.rb
diff options
context:
space:
mode:
authoraycabta <[email protected]>2021-10-08 10:26:23 +0900
committergit <[email protected]>2021-10-08 10:34:06 +0900
commit1507cb084cebdeb4d7f298e1ff677135b13d85ef (patch)
treef6c70bdbec290e8dc63cc84ab6770953f9e0ecc5 /lib/irb/input-method.rb
parent576eccf76de65828e7c68960f59b855f32093ee0 (diff)
[ruby/irb] Determine left and right when the width of either side is zero correctly
https://github.com/ruby/irb/commit/5df6e1f027
Diffstat (limited to 'lib/irb/input-method.rb')
-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.