Mercurial > vim
view src/testdir/test_exists_autocmd.vim @ 26476:7426c2657710 v8.2.3768
patch 8.2.3768: timer_info() has the wrong repeat value in a timer callback
Commit: https://github.com/vim/vim/commit/95b2dd0c008f0977ebb3cbe233a5064001a332e1
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 9 18:42:57 2021 +0000
patch 8.2.3768: timer_info() has the wrong repeat value in a timer callback
Problem: timer_info() has the wrong repeat value in a timer callback.
Solution: Do not add one to the repeat value when in the callback.
(closes #9294)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 09 Dec 2021 19:45:03 +0100 |
parents | 08940efa6b4e |
children |
line wrap: on
line source
" Test that groups and patterns are tested correctly when calling exists() for " autocommands. function Test_AutoCommands() let results=[] augroup auexists augroup END call assert_true(exists("##BufEnter")) call assert_false(exists("#BufEnter")) au BufEnter * let g:entered=1 call assert_true(exists("#BufEnter")) call assert_false(exists("#auexists#BufEnter")) augroup auexists au BufEnter * let g:entered=1 augroup END call assert_true(exists("#auexists#BufEnter")) call assert_false(exists("#BufEnter#*.test")) au BufEnter *.test let g:entered=1 call assert_true(exists("#BufEnter#*.test")) edit testfile.test call assert_false(exists("#BufEnter#<buffer>")) au BufEnter <buffer> let g:entered=1 call assert_true(exists("#BufEnter#<buffer>")) edit testfile2.test call assert_false(exists("#BufEnter#<buffer>")) endfunction " vim: shiftwidth=2 sts=2 expandtab