From e681a317fef46236f051be4adcc76ffd53ffcb40 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 13 Jun 2020 00:46:43 -0400 Subject: vim-patch:8.2.0964: TextYankPost does not provide info about Visual selection Problem: TextYankPost does not provide info about Visual selection. Solution: Add the 'visual' key in v:event. (closes vim/vim#6249) https://github.com/vim/vim/commit/37d1673ce007c46ec2338f3236ae1b7b0324bd25 --- src/nvim/testdir/test_autocmd.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 5217aa7339..d116246ef3 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -1252,6 +1252,10 @@ func Test_TextYankPost() call assert_equal( \{'regcontents': ['foo'], 'inclusive': v:false, 'regname': '', 'operator': 'y', 'visual': v:false, 'regtype': 'V'}, \g:event) + norm Vy + call assert_equal( + \{'regcontents': ['foo'], 'inclusive': v:true, 'regname': '', 'operator': 'y', 'visual': v:true, 'regtype': 'V'}, + \g:event) call feedkeys("\y", 'x') call assert_equal( \{'regcontents': ['f'], 'inclusive': v:true, 'regname': '', 'operator': 'y', 'visual': v:true, 'regtype': "\x161"}, -- cgit