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

[ruby/reline] windows fix scroll

c559d0f7a9
This commit is contained in:
YO4 2021-12-27 19:17:33 +09:00 committed by git
parent 2a311594cc
commit 31c69d66d2

View file

@ -386,7 +386,7 @@ class Reline::Windows
def self.scroll_down(val)
return if val < 0
return unless csbi = get_console_screen_buffer_info
buffer_width, x, y, buffer_lines, attributes, window_left, window_top, window_bottom = csbi.unpack('ssssSssx2s')
buffer_width, buffer_lines, x, y, attributes, window_left, window_top, window_bottom = csbi.unpack('ssssSssx2s')
screen_height = window_bottom - window_top + 1
val = screen_height if val > screen_height