From 7cc2b723d43c73653daa41fcfac623632faa9695 Mon Sep 17 00:00:00 2001 From: Jit Date: Mon, 29 Jul 2019 00:50:12 +0200 Subject: TextYankPost: spurious/too-early dispatch during delete #10392 Problem: delete-with-register dispatches TextYankPost before updating yank registers Solution: Add flag to op_yank(). Fixes #10225 --- test/functional/autocmd/textyankpost_spec.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/functional') diff --git a/test/functional/autocmd/textyankpost_spec.lua b/test/functional/autocmd/textyankpost_spec.lua index 5849679dd2..8c23b72cff 100644 --- a/test/functional/autocmd/textyankpost_spec.lua +++ b/test/functional/autocmd/textyankpost_spec.lua @@ -229,4 +229,9 @@ describe('TextYankPost', function() eq(4, eval('g:count')) end) + it('updates numbered registers correctly #10225', function() + command('autocmd TextYankPost * let g:reg = getreg("1")') + feed('"adj') + eq('foo\nbar\nbaz text\n', eval('g:reg')) + end) end) -- cgit