To:
[email protected]
Subject: Patch 6.2f.032
Fcc: outbox
From: Bram Moolenaar <
[email protected]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 6.2f.032
Problem: When a write fails for a ":silent!" while inside try/endtry the
BufWritePost autocommands are not triggered.
Solution: Check the emsg_silent flag in should_abort(). (Servatius Brandt)
Files: src/ex_eval.c, src/testdir/test49.ok, src/testdir/test49.vim
*** ../vim-6.2f.031/src/ex_eval.c Mon May 26 22:15:05 2003
--- src/ex_eval.c Fri May 30 21:45:31 2003
***************
*** 106,112 ****
should_abort(retcode)
int retcode;
{
! return ((retcode == FAIL && trylevel != 0) || aborting());
}
/*
--- 106,112 ----
should_abort(retcode)
int retcode;
{
! return ((retcode == FAIL && trylevel != 0 && !emsg_silent) || aborting());
}
/*
*** ../vim-6.2f.031/src/testdir/test49.ok Mon May 26 22:56:02 2003
--- src/testdir/test49.ok Fri May 30 21:45:31 2003
***************
*** 61,67 ****
*** Test 59: OK (311511339)
*** Test 60: OK (374889517)
*** Test 61: OK (286331153)
! *** Test 62: OK (2097103)
*** Test 63: OK (1499645335)
*** Test 64: OK (70187)
*** Test 65: OK (5464)
--- 61,67 ----
*** Test 59: OK (311511339)
*** Test 60: OK (374889517)
*** Test 61: OK (286331153)
! *** Test 62: OK (236978127)
*** Test 63: OK (1499645335)
*** Test 64: OK (70187)
*** Test 65: OK (5464)
*** ../vim-6.2f.031/src/testdir/test49.vim Mon May 26 22:56:02 2003
--- src/testdir/test49.vim Fri May 30 21:45:31 2003
***************
*** 1,6 ****
" Vim script language tests
" Author: Servatius Brandt <
[email protected]>
! " Last Change: 2003 May 26
"-------------------------------------------------------------------------------
" Test environment {{{1
--- 1,6 ----
" Vim script language tests
" Author: Servatius Brandt <
[email protected]>
! " Last Change: 2003 May 30
"-------------------------------------------------------------------------------
" Test environment {{{1
***************
*** 6100,6105 ****
--- 6100,6109 ----
" message text (without displaying it) and continuing with the next
" script line.
"
+ " When a command triggering autocommands is executed by :silent!
+ " inside a :try/:endtry, the autocommand execution is not suppressed
+ " on error.
+ "
" This test reuses the function MSG() from the previous test.
"-------------------------------------------------------------------------------
***************
*** 6184,6196 ****
Xout "'taken' is" taken "instead of" expected
endif
unlet! caught errmsg3 taken expected
delfunction S
delfunction Foo
delfunction Bar
delfunction MSG
! Xcheck 2097103
"-------------------------------------------------------------------------------
--- 6188,6209 ----
Xout "'taken' is" taken "instead of" expected
endif
+ augroup TMP
+ autocmd BufWritePost * Xpath 33554432 " X: 33554432
+ augroup END
+
+ Xpath 67108864 " X: 67108864
+ write /i/m/p/o/s/s/i/b/l/e
+ Xpath 134217728 " X: 134217728
+
+ autocmd! TMP
unlet! caught errmsg3 taken expected
delfunction S
delfunction Foo
delfunction Bar
delfunction MSG
! Xcheck 236978127
"-------------------------------------------------------------------------------
*** ../vim-6.2f.031/src/version.c Fri May 30 21:25:31 2003
--- src/version.c Fri May 30 21:51:34 2003
***************
*** 632,633 ****
--- 632,635 ----
{ /* Add new patch number below this line */
+ /**/
+ 32,
/**/
--
This planet has -- or rather had -- a problem, which was this: most
of the people living on it were unhappy for pretty much of the time.
Many solutions were suggested for this problem, but most of these
were largely concerned with the movements of small green pieces of
paper, which is odd because on the whole it wasn't the small green
pieces of paper that were unhappy.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
/// Bram Moolenaar --
[email protected] --
http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved --
http://www.Vim.org \\\
\\\ Project leader for A-A-P --
http://www.A-A-P.org ///
\\\ Help AIDS victims, buy at Amazon --
http://ICCF.nl/click1.html ///