Mercurial > vim
view src/testdir/test_exists_autocmd.vim @ 31823:a5c68c2e5ae8 v9.0.1244
patch 9.0.1244: cursor displayed in wrong position when leaving Insert mode
Commit: https://github.com/vim/vim/commit/0f843ef091eceb470caece1d90fdfe08926fe076
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 25 17:34:41 2023 +0000
patch 9.0.1244: cursor displayed in wrong position when leaving Insert mode
Problem: Cursor briefly displayed in a wrong position when pressing Esc in
Insert mode after autoindent was used.
Solution: Do not adjust the cursor position for assumed deleted white space
if text is following. (closes #11877)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 25 Jan 2023 18:45:04 +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