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)
37d1673ce0
This commit is contained in:
Jan Edmund Lazo 2020-06-13 00:46:43 -04:00
parent 833a5d16a2
commit e681a317fe
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -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("\<C-V>y", 'x')
call assert_equal(
\{'regcontents': ['f'], 'inclusive': v:true, 'regname': '', 'operator': 'y', 'visual': v:true, 'regtype': "\x161"},