diff options
author | 2006-04-02 17:18:58 +0000 | |
---|---|---|
committer | 2006-04-02 17:18:58 +0000 | |
commit | 8bb760bf3ed8498e5267fc867b33224f0972389b (patch) | |
tree | abfabc1ccdbad9a2c69c96014c6186cf79ca7833 | |
parent | Cope with FFS2's lazy inode allocation policy, adapted from FreeBSD (diff) | |
download | wireguard-openbsd-8bb760bf3ed8498e5267fc867b33224f0972389b.tar.xz wireguard-openbsd-8bb760bf3ed8498e5267fc867b33224f0972389b.zip |
fix ^W (delete to start of word) in minibuffer;
i.e. actually kill text, don't just move the pointer.
-rw-r--r-- | usr.bin/mg/echo.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/mg/echo.c b/usr.bin/mg/echo.c index c600ebb449c..9740415f513 100644 --- a/usr.bin/mg/echo.c +++ b/usr.bin/mg/echo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: echo.c,v 1.45 2006/03/30 18:32:07 kjell Exp $ */ +/* $OpenBSD: echo.c,v 1.46 2006/04/02 17:18:58 kjell Exp $ */ /* This file is in the public domain. */ @@ -420,6 +420,7 @@ veread(const char *fp, char *buf, size_t nbuf, int flag, va_list ap) ttputc('\b'); --ttcol; } + epos--; } while ((cpos > 0) && ISWORD(buf[cpos - 1])) { ttputc('\b'); @@ -432,6 +433,7 @@ veread(const char *fp, char *buf, size_t nbuf, int flag, va_list ap) ttputc('\b'); --ttcol; } + epos--; } ttflush(); break; |