diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-01-13 10:59:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-13 10:59:46 +0100 |
commit | 2dc439c672facaeb8e51ef6aa20efc0e7092eee2 (patch) | |
tree | 88de265c78d9a710c22399ccdb5058bd5edb5836 /test/functional/api/buffer_updates_spec.lua | |
parent | 89b0f5ac5a29799ad9effa1dad3c4f274b09d570 (diff) | |
parent | e5d9b15044d56acd48569b3ca7ac9dabdeaa750e (diff) | |
download | rneovim-2dc439c672facaeb8e51ef6aa20efc0e7092eee2.tar.gz rneovim-2dc439c672facaeb8e51ef6aa20efc0e7092eee2.tar.bz2 rneovim-2dc439c672facaeb8e51ef6aa20efc0e7092eee2.zip |
Merge pull request #26734 from bfredl/splitaroo
fix(buffer_updates): correct buffer updates when splitting empty line
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 050d4adfec..40fa129772 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' }) |