Skip to content

Commit 9d55682

Browse files
authored
Merge pull request #6 from bryannagle/master
Fix for "Inappropriate ioctl for device" error
2 parents c4a1dd9 + ffd34d8 commit 9d55682

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: src/utils.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ function terminal_size(io)
1010
# width, height
1111
return (Int(ws.ws_col), Int(ws.ws_row))
1212
end
13-
terminal_size() = terminal_size(stdout)
13+
14+
function terminal_size()
15+
ds = displaysize(stdout)
16+
return (last(ds), first(ds))
17+
end
1418

1519
terminal_size(io, coord::Int) = terminal_size(io)[coord]
1620
terminal_size(coord::Int) = terminal_size(stdout, coord)

0 commit comments

Comments
 (0)