comparison src/testdir/test_trycatch.vim @ 18886:050f5eaa9e50 v8.2.0004

patch 8.2.0004: get E685 and E931 if buffer reload is interrupted Commit: https://github.com/vim/vim/commit/a6e8f888e7fc31b8ab7233509254fb2e2fe4089f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Dec 14 16:18:15 2019 +0100 patch 8.2.0004: get E685 and E931 if buffer reload is interrupted Problem: Get E685 and E931 if buffer reload is interrupted. Solution: Do not abort deleting a dummy buffer. (closes https://github.com/vim/vim/issues/5361)
author Bram Moolenaar <Bram@vim.org>
date Sat, 14 Dec 2019 16:30:04 +0100
parents ece46bd3c9af
children cb73f4ae6b7c
comparison
equal deleted inserted replaced
18885:f4852c310de1 18886:050f5eaa9e50
1970 endtry 1970 endtry
1971 1971
1972 call assert_equal('jlmnpqrtueghivyzACD', g:Xpath) 1972 call assert_equal('jlmnpqrtueghivyzACD', g:Xpath)
1973 endfunc 1973 endfunc
1974 1974
1975 " Modelines {{{1 1975 func Test_reload_in_try_catch()
1976 call writefile(['x'], 'Xreload')
1977 set autoread
1978 edit Xreload
1979 tabnew
1980 call writefile(['xx'], 'Xreload')
1981 augroup ReLoad
1982 au FileReadPost Xreload let x = doesnotexist
1983 au BufReadPost Xreload let x = doesnotexist
1984 augroup END
1985 try
1986 edit Xreload
1987 catch
1988 endtry
1989 tabnew
1990
1991 tabclose
1992 tabclose
1993 autocmd! ReLoad
1994 set noautoread
1995 bwipe! Xreload
1996 call delete('Xreload')
1997 endfunc
1998
1999 " Modeline {{{1
1976 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker 2000 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
1977 "-------------------------------------------------------------------------------