aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorent FAYOLLE <florent.fayolle69@gmail.com>2016-03-15 22:39:30 +0100
committerFlorent FAYOLLE <florent.fayolle69@gmail.com>2016-03-18 13:11:44 +0100
commitdf15f978899f5d7e3b5efbb0cd8d9c653a60c11b (patch)
tree81eab9ef590950c2f4d340c1374578105367c6ed /src
parent6b22a742c73c7900ede08df1f595793bc2e550ee (diff)
downloadrneovim-df15f978899f5d7e3b5efbb0cd8d9c653a60c11b.tar.gz
rneovim-df15f978899f5d7e3b5efbb0cd8d9c653a60c11b.tar.bz2
rneovim-df15f978899f5d7e3b5efbb0cd8d9c653a60c11b.zip
vim-patch:7.4.1574
Problem: ":undo 0" does not work. (Florent Fayolle) Solution: Make it undo all the way. (closes vim/vim#688) https://github.com/vim/vim/commit/d22e9465f6228207a4fe722ee84371c7817060d6
Diffstat (limited to 'src')
-rw-r--r--src/nvim/undo.c8
-rw-r--r--src/nvim/version.c1
2 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 4a8a24d79d..7d9b2c7c3b 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -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
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 24b79e371f..98abb30b00 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -69,6 +69,7 @@ static char *features[] = {
// clang-format off
static int included_patches[] = {
+ 1574,
1570,
1511,
1366,