diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-21 13:03:28 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-21 13:03:28 +0100 |
commit | 48f377a476e4a3312aa0e3535aba170484b59483 (patch) | |
tree | 6ce6c59efdaa4029fa21168d6f561039711b45d6 /src/testdir/test_autocmd.vim | |
parent | 9d302ad4e31b4e20ce0b3af700f43edb6f5e6036 (diff) |
patch 8.1.0613: when executing an insecure function the secure flag is stuckv8.1.0613
Problem: When executing an insecure function the secure flag is stuck.
(Gabriel Barta)
Solution: Restore "secure" instead of decrementing it. (closes #3705)
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r-- | src/testdir/test_autocmd.vim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim index b05b210c20..b839bbb474 100644 --- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -650,6 +650,28 @@ func Test_OptionSet_diffmode_close() "delfunc! AutoCommandOptionSet endfunc +func Test_OptionSet_modeline() + call test_override('starting', 1) + au! OptionSet + augroup set_tabstop + au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")}) + augroup END + call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline') + set modeline + let v:errmsg = '' + call assert_fails('split XoptionsetModeline', 'E12:') + call assert_equal(7, &ts) + call assert_equal('', v:errmsg) + + augroup set_tabstop + au! + augroup END + bwipe! + set ts& + call delete('XoptionsetModeline') + call test_override('starting', 0) +endfunc + " Test for Bufleave autocommand that deletes the buffer we are about to edit. func Test_BufleaveWithDelete() new | edit Xfile1 |