1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Fix scroll range of a script for tests

https://github.com/ruby/reline/commit/6ceebe52bc
This commit is contained in:
aycabta 2021-09-10 10:56:56 +09:00 committed by git
parent e5c40c3dc9
commit 4c896cda37

View file

@ -61,7 +61,7 @@ opt.on('--dialog VAL') { |v|
if key and key.match?(dialog.name)
if context.pointer.nil?
context.pointer = 0
elsif context.first > dialog.contents.size
elsif context.pointer >= (contents.size - 1)
context.pointer = 0
else
context.pointer += 1