diff options
author | rsc <devnull@localhost> | 2003-11-23 17:53:32 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2003-11-23 17:53:32 +0000 |
commit | 17f131946f09f79a21b304050a0a2160bd024590 (patch) | |
tree | bca9787469e8156afbf6e7a427395951f25f775f /src/cmd/samterm | |
parent | 422761f81eb07e2c339dee3c71a0acead7aadd9a (diff) | |
download | plan9port-17f131946f09f79a21b304050a0a2160bd024590.tar.gz plan9port-17f131946f09f79a21b304050a0a2160bd024590.tar.bz2 plan9port-17f131946f09f79a21b304050a0a2160bd024590.zip |
change from rob -- handle ^U like in rio, acme
Diffstat (limited to 'src/cmd/samterm')
-rw-r--r-- | src/cmd/samterm/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |