Hi! the documentation says two values are returned: rows and columns. this is correct and the observed behaviour. however, the names are swapped.
K.
From a2d0fc9d22c1b5e786930efa405cdf6746cae5ea Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen <[email protected]> Date: Sat, 22 Nov 2025 19:56:06 +0100 Subject: [PATCH] fix terminal-size argument names the documentation says two values are returned: rows and columns. this is correct and the observed behaviour. however, the names are swapped. this patch should not alter the actual values returned. --- port.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/port.scm b/port.scm index 8cad547f..0a4e44a2 100644 --- a/port.scm +++ b/port.scm @@ -486,9 +486,9 @@ char *ttyname(int fd) { (let-location ((columns int) (rows int)) (if (fx= 0 (ttysize (##core#inline "C_port_fileno" port) - (location columns) - (location rows))) - (values columns rows) + (location rows) + (location columns))) + (values rows columns) (posix-error #:error 'terminal-size "cannot determine terminal size" port)))))) -- 2.51.0
