Mercurial > vim
view src/testdir/test_interrupt.vim @ 34211:f9b706e23b10 v9.1.0054
patch 9.1.0054: 'linebreak' may still apply to leading whitespace
Commit: https://github.com/vim/vim/commit/703f9bc943a29d947869b5cb0370be2ac42d5ac9
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Jan 25 21:27:13 2024 +0100
patch 9.1.0054: 'linebreak' may still apply to leading whitespace
Problem: 'linebreak' may still apply to leading whitespace
(VanaIgr)
Solution: Compare pointers instead of virtual columns.
(zeertzjq)
related: neovim/neovim#27180
closes: #13915
Co-authored-by: VanaIgr <vanaigranov@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 25 Jan 2024 21:45:02 +0100 |
parents | 860f148e7a64 |
children |
line wrap: on
line source
" Test behavior of interrupt() let s:bufwritepre_called = 0 let s:bufwritepost_called = 0 func s:bufwritepre() let s:bufwritepre_called = 1 call interrupt() endfunction func s:bufwritepost() let s:bufwritepost_called = 1 endfunction func Test_interrupt() new Xinterrupt let n = 0 try au BufWritePre Xinterrupt call s:bufwritepre() au BufWritePost Xinterrupt call s:bufwritepost() w! catch /^Vim:Interrupt$/ endtry call assert_equal(1, s:bufwritepre_called) call assert_equal(0, s:bufwritepost_called) call assert_equal(0, filereadable('Xinterrupt')) au! BufWritePre au! BufWritePost endfunc " vim: shiftwidth=2 sts=2 expandtab