mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
vim-patch:9.1.1317: noisy error when restoring folds from session fails
Problem: noisy error when restoring folds from session fails Solution: ignore errors silently when sourcing session file. (Igor Lacerda) fixes: vim/vim#15813 closes: vim/vim#17127cca5dea76e
Co-authored-by: Igor Lacerda <igorlfs@ufmg.br> (cherry picked from commite2e6c159d3
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
b7de104d86
commit
248528c907
@@ -1198,6 +1198,24 @@ func Test_mkview_manual_fold()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
" Test for handling invalid folds within views
|
||||
func Test_mkview_ignore_invalid_folds()
|
||||
call writefile(range(1,10), 'Xmkvfile', 'D')
|
||||
new Xmkvfile
|
||||
" create some folds
|
||||
5,6fold
|
||||
4,7fold
|
||||
mkview Xview
|
||||
normal zE
|
||||
" delete lines to make folds invalid
|
||||
call deletebufline('', 6, '$')
|
||||
source Xview
|
||||
call assert_equal([-1, -1, -1, -1, -1, -1], [foldclosed(3), foldclosed(4),
|
||||
\ foldclosed(5), foldclosed(6), foldclosed(7), foldclosed(8)])
|
||||
call delete('Xview')
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
" Test default 'viewdir' value
|
||||
func Test_mkview_default_home()
|
||||
throw 'Skipped: N/A'
|
||||
|
Reference in New Issue
Block a user