Skip to content

Commit

Permalink
Add "sleep 0.01" to Windows event loop
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Aug 20, 2021
1 parent b56bf1b commit dfc89ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/reline/windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def self.process_key_event(repeat_count, virtual_key_code, virtual_scan_code, ch
def self.check_input_event
num_of_events = 0.chr * 8
while @@output_buf.empty? #or true
sleep 0.01
next if @@GetNumberOfConsoleInputEvents.(@@hConsoleInputHandle, num_of_events) == 0 or num_of_events.unpack('L').first == 0
input_record = 0.chr * 18
read_event = 0.chr * 4
Expand Down

0 comments on commit dfc89ea

Please sign in to comment.