diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-03-11 12:33:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-11 12:33:01 +0100 |
commit | f3efcd0348d34e4ebb44bde3be310379fb84a5a9 (patch) | |
tree | b2ad87fbe69d5404a300e684ce871f81bb8e0f2d /test/functional/lua/buffer_updates_spec.lua | |
parent | 402c31a82d2961172c6eaf8014762f28c60bd93e (diff) | |
parent | 2748202e0eb28574cdc65dcb758adea89023271d (diff) | |
download | rneovim-f3efcd0348d34e4ebb44bde3be310379fb84a5a9.tar.gz rneovim-f3efcd0348d34e4ebb44bde3be310379fb84a5a9.tar.bz2 rneovim-f3efcd0348d34e4ebb44bde3be310379fb84a5a9.zip |
Merge pull request #22625 from tomtomjhj/diff-on_bytes-once
fix(diff): trigger on_bytes only once after diffget/diffput
Diffstat (limited to 'test/functional/lua/buffer_updates_spec.lua')
-rw-r--r-- | test/functional/lua/buffer_updates_spec.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/lua/buffer_updates_spec.lua b/test/functional/lua/buffer_updates_spec.lua index b1b39501f7..2cd3123dcd 100644 --- a/test/functional/lua/buffer_updates_spec.lua +++ b/test/functional/lua/buffer_updates_spec.lua @@ -1171,6 +1171,25 @@ describe('lua: nvim_buf_attach on_bytes', function() } end) + it('works with :diffput and :diffget', function() + local check_events = setup_eventcheck(verify, {"AAA"}) + command('diffthis') + command('new') + command('diffthis') + meths.buf_set_lines(0, 0, -1, true, {"AAA", "BBB"}) + feed('G') + command('diffput') + check_events { + { "test1", "bytes", 1, 3, 1, 0, 4, 0, 0, 0, 1, 0, 4 }; + } + meths.buf_set_lines(0, 0, -1, true, {"AAA", "CCC"}) + feed('<C-w>pG') + command('diffget') + check_events { + { "test1", "bytes", 1, 4, 1, 0, 4, 1, 0, 4, 1, 0, 4 }; + } + end) + local function test_lockmarks(mode) local description = (mode ~= "") and mode or "(baseline)" it("test_lockmarks " .. description .. " %delete _", function() |