Skip to content

Commit

Permalink
Use fdiv for keyseq_timeout msec to sec conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Aug 20, 2023
1 parent d4f0cd3 commit a5e1da6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/reline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,7 @@ def readline(prompt = '', add_hist = false)
end

private def read_2nd_character_of_key_sequence(keyseq_timeout, buffer, c, block)
succ_c = io_gate.getc(keyseq_timeout / 1000)

succ_c = io_gate.getc(keyseq_timeout.fdiv(1000))
if succ_c
case key_stroke.match_status(buffer.dup.push(succ_c))
when :unmatched
Expand Down Expand Up @@ -462,7 +461,7 @@ def readline(prompt = '', add_hist = false)
end

private def read_escaped_key(keyseq_timeout, c, block)
escaped_c = io_gate.getc(keyseq_timeout / 1000)
escaped_c = io_gate.getc(keyseq_timeout.fdiv(1000))

if escaped_c.nil?
block.([Reline::Key.new(c, c, false)])
Expand Down

0 comments on commit a5e1da6

Please sign in to comment.