summaryrefslogtreecommitdiffstats
path: root/rsnix/src/tty.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-08-01 18:03:20 +0200
committersalmonik <salmonik@tuta.io>2026-08-01 18:03:20 +0200
commitc2b6daeaaf1da5c6f81300e954f2b3592c0668c0 (patch)
tree62411383ea6a2d69ecf2b0fdf3e18155e660796d /rsnix/src/tty.rs
parentrsnix: preemptive kernel tasks (ADR 0003) — sched, IST fault stacks, 176-by... (diff)
downloadrs-dos-c2b6daeaaf1da5c6f81300e954f2b3592c0668c0.tar.gz
rs-dos-c2b6daeaaf1da5c6f81300e954f2b3592c0668c0.zip
klog/tty/pager: no more truncated lines — full lines flow, terminal wraps
- 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
Diffstat (limited to '')
-rw-r--r--rsnix/src/tty.rs5
1 files changed, 4 insertions, 1 deletions
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};
17use crate::strbuf; 17use crate::strbuf;
18use crate::{gop, serial}; 18use crate::{gop, serial};
19 19
20pub const LINE_BUF_SIZE: usize = 256; 20/// Max characters a single typed line can hold. Long enough that no
21/// realistic command line gets silently cut — the terminal wraps the
22/// echo at the screen edge, and the full line is what's submitted.
23pub const LINE_BUF_SIZE: usize = 1024;
21 24
22/// Result of one canonical line-input session. 25/// Result of one canonical line-input session.
23#[allow(clippy::large_enum_variant)] // stack buffer by design (no heap churn) 26#[allow(clippy::large_enum_variant)] // stack buffer by design (no heap churn)