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

[ruby/reline] Call LineEditor#resize on Windows

https://github.com/ruby/reline/commit/65b27dd2ff
This commit is contained in:
aycabta 2021-10-01 14:25:43 +09:00 committed by git
parent ef350b3a56
commit bf0a8a7462

View file

@ -234,6 +234,7 @@ class Reline::Windows
def self.check_input_event def self.check_input_event
num_of_events = 0.chr * 8 num_of_events = 0.chr * 8
while @@output_buf.empty? #or true while @@output_buf.empty? #or true
Reline.core.line_editor.resize
next if @@WaitForSingleObject.(@@hConsoleInputHandle, 100) != 0 # max 0.1 sec next if @@WaitForSingleObject.(@@hConsoleInputHandle, 100) != 0 # max 0.1 sec
next if @@GetNumberOfConsoleInputEvents.(@@hConsoleInputHandle, num_of_events) == 0 or num_of_events.unpack1('L') == 0 next if @@GetNumberOfConsoleInputEvents.(@@hConsoleInputHandle, num_of_events) == 0 or num_of_events.unpack1('L') == 0
input_record = 0.chr * 18 input_record = 0.chr * 18