mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 22:48:34 +00:00
vim-patch:8.2.2176: crash with a sequence of fold commands
Problem: Crash with a sequence of fold commands. Solution: Bail out when there are no folds at all. Add a test (Dominique Pellé) (closes vim/vim#7515)6a78f32844
N/A patches for version.c: vim-patch:8.2.2174: Mac version doesn't specify the CPU architecture Problem: Mac version doesn't specify the CPU architecture. Solution: Add "arm64" or "x86_64". (Yee Cheng Chin, closes vim/vim#7519)8c9d98a8af
vim-patch:8.2.2175: github actions: clang-11 handling suboptimal Problem: Github actions: clang-11 handling suboptimal. Solution: Separate step of installing clang-11. Get ubuntu release name dynamically. (Ozaki Kiichi, closes vim/vim#7514)9aff970204
This commit is contained in:
@@ -902,8 +902,9 @@ int foldMoveTo(
|
|||||||
bool last = false;
|
bool last = false;
|
||||||
for (;; ) {
|
for (;; ) {
|
||||||
if (!foldFind(gap, curwin->w_cursor.lnum - lnum_off, &fp)) {
|
if (!foldFind(gap, curwin->w_cursor.lnum - lnum_off, &fp)) {
|
||||||
if (!updown)
|
if (!updown || gap->ga_len == 0) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* When moving up, consider a fold above the cursor; when
|
/* When moving up, consider a fold above the cursor; when
|
||||||
* moving down consider a fold below the cursor. */
|
* moving down consider a fold below the cursor. */
|
||||||
|
@@ -815,4 +815,11 @@ func Test_fold_create_delete_create()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" this was crashing
|
||||||
|
func Test_fold_create_delete()
|
||||||
|
new
|
||||||
|
norm zFzFzdzj
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
Reference in New Issue
Block a user