commit | d22e9465f6228207a4fe722ee84371c7817060d6 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Tue Mar 15 17:43:55 2016 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Tue Mar 15 17:43:55 2016 +0100 |
tree | 88c78b4173edd9f3f84ed69341d7dac225bbf286 | |
parent | ce2ec0a82a778ff4d79a2c3309f6cac079d7b5ee [diff] [blame] |
patch 7.4.1574 Problem: ":undo 0" does not work. (Florent Fayolle) Solution: Make it undo all the way. (closes #688)
diff --git a/src/undo.c b/src/undo.c index 2bf815b..07b2781 100644 --- a/src/undo.c +++ b/src/undo.c
@@ -2286,7 +2286,14 @@ * 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