From c2b6daeaaf1da5c6f81300e954f2b3592c0668c0 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sat, 1 Aug 2026 18:03:20 +0200 Subject: klog/tty/pager: no more truncated lines — full lines flow, terminal wraps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - klog: MAX_LINE 128 -> 512 (lens widened u8 -> u16) — long serial_println lines (panics, boot messages) are no longer cut at 128 bytes; they print in full and the terminal wraps them at the screen edge - tty: LINE_BUF_SIZE 256 -> 1024 — typed command lines longer than 256 chars were silently dropped at the buffer limit; now they echo and submit in full (the terminal already wraps the echo mid-typing) - pager (-p): screenfuls now count wrapped rows, not lines — a line wider than the terminal occupies ceil(len/cols) rows, so the pause lands at a real screen boundary instead of overflowing it --- rsnix/src/tty.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rsnix/src/tty.rs') diff --git a/rsnix/src/tty.rs b/rsnix/src/tty.rs index 81a7a24..7304925 100644 --- a/rsnix/src/tty.rs +++ b/rsnix/src/tty.rs @@ -17,7 +17,10 @@ use crate::ps2::{self, KeyEvent}; use crate::strbuf; use crate::{gop, serial}; -pub const LINE_BUF_SIZE: usize = 256; +/// Max characters a single typed line can hold. Long enough that no +/// realistic command line gets silently cut — the terminal wraps the +/// echo at the screen edge, and the full line is what's submitted. +pub const LINE_BUF_SIZE: usize = 1024; /// Result of one canonical line-input session. #[allow(clippy::large_enum_variant)] // stack buffer by design (no heap churn) -- cgit v1.2.3