diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-12-25 13:06:00 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-01-13 10:39:32 +0100 |
commit | e5d9b15044d56acd48569b3ca7ac9dabdeaa750e (patch) | |
tree | 5ac3644a9c5af48c791504e06bec9dadf70fdb84 /test/functional/api/buffer_updates_spec.lua | |
parent | 3bcf8e5622f29a65564bf2f7672997432e183dfa (diff) | |
download | rneovim-e5d9b15044d56acd48569b3ca7ac9dabdeaa750e.tar.gz rneovim-e5d9b15044d56acd48569b3ca7ac9dabdeaa750e.tar.bz2 rneovim-e5d9b15044d56acd48569b3ca7ac9dabdeaa750e.zip |
fix(buffer_updates): correct buffer updates when splitting empty line
fixes #11591
Diffstat (limited to 'test/functional/api/buffer_updates_spec.lua')
-rw-r--r-- | test/functional/api/buffer_updates_spec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/api/buffer_updates_spec.lua b/test/functional/api/buffer_updates_spec.lua index b0efcf0dab..8e43d28322 100644 --- a/test/functional/api/buffer_updates_spec.lua +++ b/test/functional/api/buffer_updates_spec.lua @@ -349,6 +349,16 @@ describe('API: buffer events:', function() expectn('nvim_buf_lines_event', { b, tick, 3, 4, {}, false }) end) + it('visual paste split empty line', function() + local b, tick = editoriginal(true, { 'abc', '{', 'def', '}' }) + command('normal! ggyyjjvi{p') + expectn('nvim_buf_lines_event', { b, tick + 1, 2, 3, { '' }, false }) + expectn('nvim_buf_lines_event', { b, tick + 2, 2, 3, { '}' }, false }) + expectn('nvim_buf_lines_event', { b, tick + 3, 3, 4, {}, false }) + expectn('nvim_buf_lines_event', { b, tick + 3, 2, 3, { '' }, false }) + expectn('nvim_buf_lines_event', { b, tick + 4, 3, 3, { 'abc', '}' }, false }) + end) + it('when lines are filtered', function() -- Test filtering lines with !cat local b, tick = editoriginal(true, { 'A', 'C', 'E', 'B', 'D', 'F' }) |