summaryrefslogtreecommitdiff
path: root/usr.bin/mg/dired.c
diff options
context:
space:
mode:
authorMark Lumsden <lum@cvs.openbsd.org>2015-10-13 20:10:10 +0000
committerMark Lumsden <lum@cvs.openbsd.org>2015-10-13 20:10:10 +0000
commit98302021a13788bd8fa6310d99d8f7b37bee20ef (patch)
tree0e6272d7339231d61d85a6a74d62f08188fdfdc3 /usr.bin/mg/dired.c
parent538b24602ed77f3cafa34c0ecdbaa844884e822d (diff)
Check if a file name can be extracted from a line before marking for
deletion.
Diffstat (limited to 'usr.bin/mg/dired.c')
-rw-r--r--usr.bin/mg/dired.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/dired.c b/usr.bin/mg/dired.c
index 3fb6199c4a6..36413649602 100644
--- a/usr.bin/mg/dired.c
+++ b/usr.bin/mg/dired.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dired.c,v 1.78 2015/10/12 19:08:39 lum Exp $ */
+/* $OpenBSD: dired.c,v 1.79 2015/10/13 20:10:09 lum Exp $ */
/* This file is in the public domain. */
@@ -286,7 +286,7 @@ d_del(int f, int n)
if (n < 0)
return (FALSE);
while (n--) {
- if (llength(curwp->w_dotp) > 0) {
+ if (d_warpdot(curwp->w_dotp, &curwp->w_doto) == TRUE) {
lputc(curwp->w_dotp, 0, DDELCHAR);
curbp->b_flag |= BFDIREDDEL;
}