diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2006-04-02 17:18:59 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2006-04-02 17:18:59 +0000 |
commit | c819e5c934e9e280442605dc97e45aa9833cf353 (patch) | |
tree | c41ad218a1f5522aa7a84076caaa6216dd139141 /usr.bin/mg | |
parent | bfd7062d86fa2ab46f3a144bc4e188a682b0fc38 (diff) |
fix ^W (delete to start of word) in minibuffer;
i.e. actually kill text, don't just move the pointer.
Diffstat (limited to 'usr.bin/mg')
-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; |