Patch 8.2.4728
Problem: No test that v:event cannot be modified.
Solution: Add a test. (closes #10139)
Files: src/testdir/test_autocmd.vim
*** ../vim-8.2.4727/src/testdir/test_autocmd.vim 2022-04-09
11:37:08.196325535 +0100
--- src/testdir/test_autocmd.vim 2022-04-10 11:42:18.117406003 +0100
***************
*** 3117,3121 ****
--- 3117,3139 ----
%bwipe!
endfunc
+ func Test_v_event_readonly()
+ autocmd CompleteChanged * let v:event.width = 0
+ call assert_fails("normal! i\<C-X>\<C-V>", 'E46:')
+ au! CompleteChanged
+
+ autocmd DirChangedPre * let v:event.directory = ''
+ call assert_fails('cd .', 'E46:')
+ au! DirChangedPre
+
+ autocmd ModeChanged * let v:event.new_mode = ''
+ call assert_fails('normal! cc', 'E46:')
+ au! ModeChanged
+
+ autocmd TextYankPost * let v:event.operator = ''
+ call assert_fails('normal! yy', 'E46:')
+ au! TextYankPost
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.4727/src/version.c 2022-04-10 11:26:00.945539611 +0100
--- src/version.c 2022-04-10 11:43:53.009337034 +0100
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4728,
/**/
--
LARGE MAN: Who's that then?
CART DRIVER: (Grudgingly) I dunno, Must be a king.
LARGE MAN: Why?
CART DRIVER: He hasn't got shit all over him.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ 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/20220410104439.F14F91C0463%40moolenaar.net.