diff options
author | Peter Hessler <phessler@cvs.openbsd.org> | 2018-12-26 07:01:23 +0000 |
---|---|---|
committer | Peter Hessler <phessler@cvs.openbsd.org> | 2018-12-26 07:01:23 +0000 |
commit | 80fa123484da3ec07407882b11552f29df41d52a (patch) | |
tree | 286aa811f78514c9d721d9b237d1047478ff5bb0 /usr.bin/mg/util.c | |
parent | 022f3181c38d24686768379807a6d93b25055573 (diff) |
revert "kill a region if 'delete' or 'backspace' is pressed"
This caused a change of behaviour in the search case, and isn't yet ready.
Committing on the behalf of lum@
OK lum@
Diffstat (limited to 'usr.bin/mg/util.c')
-rw-r--r-- | usr.bin/mg/util.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/usr.bin/mg/util.c b/usr.bin/mg/util.c index a35bc5edd25..1563d66321f 100644 --- a/usr.bin/mg/util.c +++ b/usr.bin/mg/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.39 2018/12/18 20:35:34 lum Exp $ */ +/* $OpenBSD: util.c,v 1.40 2018/12/26 07:01:22 phessler Exp $ */ /* This file is in the public domain. */ @@ -411,8 +411,7 @@ indent(int f, int n) * Delete forward. This is real easy, because the basic delete routine does * all of the work. Watches for negative arguments, and does the right thing. * If any argument is present, it kills rather than deletes, to prevent loss - * of text if typed with a big argument. Normally bound to "C-d". - * If the cursor is in a region, kill the region. + * of text if typed with a big argument. Normally bound to "C-D". */ /* ARGSUSED */ int @@ -421,9 +420,6 @@ forwdel(int f, int n) if (n < 0) return (backdel(f | FFRAND, -n)); - if (curwp->w_markp != NULL) - return(killregion(FFRAND, 1)); - /* really a kill */ if (f & FFARG) { if ((lastflag & CFKILL) == 0) @@ -438,7 +434,6 @@ forwdel(int f, int n) * Delete backwards. This is quite easy too, because it's all done with * other functions. Just move the cursor back, and delete forwards. Like * delete forward, this actually does a kill if presented with an argument. - * If the cursor is in a region, kill the region. */ /* ARGSUSED */ int @@ -449,9 +444,6 @@ backdel(int f, int n) if (n < 0) return (forwdel(f | FFRAND, -n)); - if (curwp->w_markp != NULL) - return (killregion(FFRAND, 1)); - /* really a kill */ if (f & FFARG) { if ((lastflag & CFKILL) == 0) |