summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlum <lum@openbsd.org>2013-05-29 19:16:48 +0000
committerlum <lum@openbsd.org>2013-05-29 19:16:48 +0000
commit3f62a81fdc8d348efca6f7db70d6ae3cd5c5524c (patch)
tree7392fbe76dc6633b8cfc9d7870f29a8cc9340500
parentremove non-existing kernel configurations (diff)
downloadwireguard-openbsd-3f62a81fdc8d348efca6f7db70d6ae3cd5c5524c.tar.xz
wireguard-openbsd-3f62a81fdc8d348efca6f7db70d6ae3cd5c5524c.zip
Make the mg dired commands:
dired-flag-file-deleted dired-backup-unflag dired-unflag behave more like emacs when the cursor stays on the first character of the file name.
-rw-r--r--usr.bin/mg/dired.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/mg/dired.c b/usr.bin/mg/dired.c
index 7a2a9fdfa4d..e8aecf03e47 100644
--- a/usr.bin/mg/dired.c
+++ b/usr.bin/mg/dired.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dired.c,v 1.55 2013/05/29 05:28:48 lum Exp $ */
+/* $OpenBSD: dired.c,v 1.56 2013/05/29 19:16:48 lum Exp $ */
/* This file is in the public domain. */
@@ -275,8 +275,7 @@ d_del(int f, int n)
curwp->w_dotp = lforw(curwp->w_dotp);
}
curwp->w_rflag |= WFEDIT | WFMOVE;
- curwp->w_doto = 0;
- return (TRUE);
+ return (d_warpdot(curwp->w_dotp, &curwp->w_doto));
}
/* ARGSUSED */
@@ -292,8 +291,7 @@ d_undel(int f, int n)
curwp->w_dotp = lforw(curwp->w_dotp);
}
curwp->w_rflag |= WFEDIT | WFMOVE;
- curwp->w_doto = 0;
- return (TRUE);
+ return (d_warpdot(curwp->w_dotp, &curwp->w_doto));
}
/* ARGSUSED */
@@ -308,9 +306,8 @@ d_undelbak(int f, int n)
if (lback(curwp->w_dotp) != curbp->b_headp)
curwp->w_dotp = lback(curwp->w_dotp);
}
- curwp->w_doto = 0;
curwp->w_rflag |= WFEDIT | WFMOVE;
- return (TRUE);
+ return (d_warpdot(curwp->w_dotp, &curwp->w_doto));
}
/* ARGSUSED */