Patch 8.1.1311
Problem:    Aborting an autocmd with an exception is not tested.
Solution:   Add a test.  Also shows how to abort a command by throwing an
            exception.
Files:      src/testdir/test_autocmd.vim


*** ../vim-8.1.1310/src/testdir/test_autocmd.vim        2019-04-25 
22:21:56.931749183 +0200
--- src/testdir/test_autocmd.vim        2019-05-09 21:33:57.024924448 +0200
***************
*** 1733,1735 ****
--- 1733,1754 ----
    call delete('Xtest.c')
    call delete('test.out')
  endfunc
+ 
+ func Test_throw_in_BufWritePre()
+   new
+   call setline(1, ['one', 'two', 'three'])
+   call assert_false(filereadable('Xthefile'))
+   augroup throwing
+     au BufWritePre X* throw 'do not write'
+   augroup END
+   try
+     w Xthefile
+   catch
+     let caught = 1
+   endtry
+   call assert_equal(1, caught)
+   call assert_false(filereadable('Xthefile'))
+ 
+   bwipe!
+   au! throwing
+ endfunc
*** ../vim-8.1.1310/src/version.c       2019-05-09 21:08:53.764083394 +0200
--- src/version.c       2019-05-09 21:37:32.256160734 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1311,
  /**/

-- 
Corn oil comes from corn and olive oil comes from olives, so where
does baby oil come from?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201905091939.x49JdUTH008018%40masaka.moolenaar.net.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui