Skip to content

Commit 0b2eb3c

Browse files
authored
Apply suggestions from code review
1 parent 622ed63 commit 0b2eb3c

File tree

1 file changed

+3
-3
lines changed
  • stdlib/REPL/src/TerminalMenus

1 file changed

+3
-3
lines changed

stdlib/REPL/src/TerminalMenus/util.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ function _readkey(stream::IO=stdin)
2323

2424
# Escape characters
2525
if c == '\x1b'
26-
bytesavailable(stream) < 2 && return '\x1b'
26+
bytesavailable(stream) < 1 && return '\x1b'
2727
esc_a = readbyte(stream)
2828
esc_a == 'v' && return PAGE_UP # M-v
2929
esc_a == '<' && return HOME_KEY # M-<
3030
esc_a == '>' && return END_KEY # M->
3131

32-
bytesavailable(stream) < 3 && return '\x1b'
32+
bytesavailable(stream) < 1 && return '\x1b'
3333
esc_b = readbyte(stream)
3434

3535
if esc_a == '[' || esc_a == 'O'
3636
if esc_b >= '0' && esc_b <= '9'
37-
bytesavailable(stream) < 4 && return '\x1b'
37+
bytesavailable(stream) < 1 && return '\x1b'
3838
esc_c = readbyte(stream)
3939
if esc_c == '~'
4040
esc_b == '1' && return HOME_KEY

0 commit comments

Comments
 (0)