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. ok?
mark
Index: dired.c
===================================================================
RCS file: /cvs/src/usr.bin/mg/dired.c,v
retrieving revision 1.54
diff -u -p -r1.54 dired.c
--- dired.c 28 May 2013 18:35:10 -0000 1.54
+++ dired.c 28 May 2013 19:09:15 -0000
@@ -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 */