Skip to content

Commit b91bd4a

Browse files
committed
Changed terminal_size method in utils.jl to use Base.displaysize method. This fixes the "Inappropriate ioctl for device" error when running in an
interactive rep.
1 parent c4a1dd9 commit b91bd4a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ const HEIGHT = Ref{Int}()
66
const MODE = Ref{Symbol}(:default)
77

88
function terminal_size(io)
9-
ws = IOCTL.ioctl(io, IOCTL.TIOCGWINSZ)
10-
# width, height
11-
return (Int(ws.ws_col), Int(ws.ws_row))
9+
return displaysize(stdout)
1210
end
1311
terminal_size() = terminal_size(stdout)
1412

0 commit comments

Comments
 (0)