summaryrefslogtreecommitdiff
path: root/lib/irb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-10-08 10:24:55 +0900
committergit <svn-admin@ruby-lang.org>2021-10-08 10:33:56 +0900
commit576eccf76de65828e7c68960f59b855f32093ee0 (patch)
tree687e786b87b64809fd07e4448e1a5f841e448cb1 /lib/irb
parent374efa8e302c8cd19bf41e3f6f87582532cce79c (diff)
[ruby/irb] Calculate right side doc dialog width correctly
https://github.com/ruby/irb/commit/f34da7fa04
Diffstat (limited to 'lib/irb')
-rw-r--r--lib/irb/input-method.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index 9fba4ed852..49c52bd8da 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -369,7 +369,7 @@ module IRB
right_x = cursor_pos_to_render.x + autocomplete_dialog.width
if right_x + width > screen_width
- right_width = screen_width - (right_x + 0)
+ right_width = screen_width - (right_x + 1)
left_x = autocomplete_dialog.column - width
left_x = 0 if left_x < 0
left_width = width > autocomplete_dialog.column ? autocomplete_dialog.column : width