0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.1574

Problem:    ":undo 0" does not work. (Florent Fayolle)
Solution:   Make it undo all the way. (closes #688)
This commit is contained in:
Bram Moolenaar 2016-03-15 17:43:55 +01:00
parent ce2ec0a82a
commit d22e9465f6
4 changed files with 11 additions and 3 deletions

View File

@ -4,6 +4,7 @@
source test_assign.vim source test_assign.vim
source test_cursor_func.vim source test_cursor_func.vim
source test_delete.vim source test_delete.vim
source test_ex_undo.vim
source test_expand.vim source test_expand.vim
source test_feedkeys.vim source test_feedkeys.vim
source test_file_perm.vim source test_file_perm.vim

View File

@ -1,7 +1,5 @@
" Tests for 'undolevels' " Tests for 'undolevels'
set nocompatible viminfo+=nviminfo
func FillBuffer() func FillBuffer()
for i in range(1,13) for i in range(1,13)
put=i put=i

View File

@ -2286,7 +2286,14 @@ undo_time(
* Init "closest" to a value we can't reach. */ * Init "closest" to a value we can't reach. */
if (absolute) 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; closest = -1;
} }
else else

View File

@ -743,6 +743,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1574,
/**/ /**/
1573, 1573,
/**/ /**/