vim-patch:7.4.1574

Problem:    ":undo 0" does not work. (Florent Fayolle)
Solution:   Make it undo all the way. (closes vim/vim#688)

d22e9465f6
This commit is contained in:
Florent FAYOLLE 2016-03-15 22:39:30 +01:00
parent 6b22a742c7
commit df15f97889
2 changed files with 8 additions and 1 deletions

View File

@ -1782,7 +1782,13 @@ void undo_time(long step, int sec, int file, int absolute)
/* "target" is the node below which we want to be.
* Init "closest" to a value we can't reach. */
if (absolute) {
target = step;
if (step == 0) {
// target 0 does not exist, got to 1 and above it.
target = 1;
above = true;
} else {
target = step;
}
closest = -1;
} else {
/* When doing computations with time_t subtract starttime, because

View File

@ -69,6 +69,7 @@ static char *features[] = {
// clang-format off
static int included_patches[] = {
1574,
1570,
1511,
1366,