Mercurial > vim
view src/testdir/test_exists_autocmd.vim @ 28077:ba9f1a9ddaf9 v8.2.4563
patch 8.2.4563: "z=" in Visual mode may go beyond the end of the line
Commit: https://github.com/vim/vim/commit/5c68617d395f9d7b824f68475b24ce3e38d653a3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 13 20:12:25 2022 +0000
patch 8.2.4563: "z=" in Visual mode may go beyond the end of the line
Problem: "z=" in Visual mode may go beyond the end of the line.
Solution: Adjust "badlen".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Mar 2022 21:15: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