-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed as not planned
Closed as not planned
Copy link
Labels
good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to JuliaioInvolving the I/O subsystem: libuv, read, write, etc.Involving the I/O subsystem: libuv, read, write, etc.
Description
For example in my terminal locally:
julia> displaysize(stdout)
(46, 167)
julia> displaysize(IOContext(IOBuffer(), stdout))
(24, 80)
This has flow-on effects like the context
argument to sprint
not being used for the display size and seems inconsistent with the :displaysize
key being inherited from an IOContext
.
On the other hand, it's not obvious to me how to fix this. If we always called displaysize
on the context when creating the IOContext
, we'd hit uv_tty_get_winsize
which in turn hits an ioctl
syscall on unix. That seems like a nasty pessimization. Another idea is to stash the context
IO somewhere so we can call displaysize lazily.
fonsp and nickrobinson251
Metadata
Metadata
Assignees
Labels
good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to JuliaioInvolving the I/O subsystem: libuv, read, write, etc.Involving the I/O subsystem: libuv, read, write, etc.