mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
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:
@@ -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.
|
/* "target" is the node below which we want to be.
|
||||||
* Init "closest" to a value we can't reach. */
|
* Init "closest" to a value we can't reach. */
|
||||||
if (absolute) {
|
if (absolute) {
|
||||||
|
if (step == 0) {
|
||||||
|
// target 0 does not exist, got to 1 and above it.
|
||||||
|
target = 1;
|
||||||
|
above = true;
|
||||||
|
} else {
|
||||||
target = step;
|
target = step;
|
||||||
|
}
|
||||||
closest = -1;
|
closest = -1;
|
||||||
} else {
|
} else {
|
||||||
/* When doing computations with time_t subtract starttime, because
|
/* When doing computations with time_t subtract starttime, because
|
||||||
|
@@ -69,6 +69,7 @@ static char *features[] = {
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static int included_patches[] = {
|
static int included_patches[] = {
|
||||||
|
1574,
|
||||||
1570,
|
1570,
|
||||||
1511,
|
1511,
|
||||||
1366,
|
1366,
|
||||||
|
Reference in New Issue
Block a user