mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.1972: crash when recreating nested fold
Problem: Crash when recreating nested fold. Solution: Check for empty growarray. (closes vim/vim#7278)5e1f22ff61
N/A patches for version.c: vim-patch:8.2.1974: Vim9: test for has('gui_running') fails with VIMDLL Problem: Vim9: test for has('gui_running') fails with VIMDLL. Solution: Adjust the #ifdef. (Ken Takata, closes vim/vim#7276)29b281ba8d
This commit is contained in:
parent
0a95549d66
commit
3013d0edfc
@ -616,7 +616,11 @@ void foldCreate(win_T *wp, pos_T start, pos_T end)
|
||||
break;
|
||||
}
|
||||
}
|
||||
i = (int)(fp - (fold_T *)gap->ga_data);
|
||||
if (gap->ga_len == 0) {
|
||||
i = 0;
|
||||
} else {
|
||||
i = (int)(fp - (fold_T *)gap->ga_data);
|
||||
}
|
||||
}
|
||||
|
||||
ga_grow(gap, 1);
|
||||
|
@ -805,4 +805,14 @@ func Test_move_no_folds()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" this was crashing
|
||||
func Test_fold_create_delete_create()
|
||||
new
|
||||
fold
|
||||
fold
|
||||
normal zd
|
||||
fold
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
Loading…
Reference in New Issue
Block a user