From 17f131946f09f79a21b304050a0a2160bd024590 Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 23 Nov 2003 17:53:32 +0000 Subject: [PATCH] change from rob -- handle ^U like in rio, acme --- src/cmd/samterm/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmd/samterm/main.c b/src/cmd/samterm/main.c index 79d3e0ec..07c3426a 100644 --- a/src/cmd/samterm/main.c +++ b/src/cmd/samterm/main.c @@ -361,6 +361,10 @@ ctlw(Rasp *r, long o, long p) long ctlu(Rasp *r, long o, long p) { + if(--p < o) + return o; + if(raspc(r, p)=='\n') + return p; for(; p-1>=o && raspc(r, p-1)!='\n'; --p) ; return p>=o? p : o;