1
0
forked from aniani/vim

Added ":earlier 1f" and ":later 1f".

This commit is contained in:
Bram Moolenaar
2010-06-27 05:18:54 +02:00
parent a800b42975
commit 730cde924c
14 changed files with 216 additions and 40 deletions

View File

@@ -8461,7 +8461,7 @@ ex_undo(eap)
exarg_T *eap UNUSED;
{
if (eap->addr_count == 1) /* :undo 123 */
undo_time(eap->line2, FALSE, TRUE);
undo_time(eap->line2, FALSE, FALSE, TRUE);
else
u_undo(1);
}
@@ -8507,6 +8507,7 @@ ex_later(eap)
{
long count = 0;
int sec = FALSE;
int file = FALSE;
char_u *p = eap->arg;
if (*p == NUL)
@@ -8519,13 +8520,16 @@ ex_later(eap)
case 's': ++p; sec = TRUE; break;
case 'm': ++p; sec = TRUE; count *= 60; break;
case 'h': ++p; sec = TRUE; count *= 60 * 60; break;
case 'd': ++p; sec = TRUE; count *= 24 * 60 * 60; break;
case 'f': ++p; file = TRUE; break;
}
}
if (*p != NUL)
EMSG2(_(e_invarg2), eap->arg);
else
undo_time(eap->cmdidx == CMD_earlier ? -count : count, sec, FALSE);
undo_time(eap->cmdidx == CMD_earlier ? -count : count,
sec, file, FALSE);
}
/*