Skip to content

Commit 2cc8cfc

Browse files
committed
docs: improve documentation for open_null_device return value
1 parent e994496 commit 2cc8cfc

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

R/safe_graphics.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ with_graphics_device <- function(expr) {
2727
#' Open a file-backed device (prefer the session default) targeting the
2828
#' platform null file so no output is created on disk.
2929
#'
30-
#' @returns The opened device number (or 1 if opening failed).
30+
#' @returns The device number returned by [grDevices::dev.cur()] after the
31+
#' attempt. If no device could be opened, this will be `1` (the null device;
32+
#' i.e., no active device), which is safe because `close_device()` treats `1`
33+
#' as a no-op.
3134
#'
3235
#' @noRd
3336
open_null_device <- function() {

0 commit comments

Comments
 (0)