diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-09-16 10:39:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-16 10:39:54 +0200 |
commit | 40bfca744dd0c87df6ec2ab776f982636e4b0904 (patch) | |
tree | 0f5756a18a1c804b12cdb7eaa956f4f69aaf8d6a /test/functional/api/extmark_spec.lua | |
parent | 2d2cf150e13016566567cb854bfdd45d7a84b06e (diff) | |
parent | 585549625d8aef073e874d7cace9ab9df0d71847 (diff) | |
download | rneovim-40bfca744dd0c87df6ec2ab776f982636e4b0904.tar.gz rneovim-40bfca744dd0c87df6ec2ab776f982636e4b0904.tar.bz2 rneovim-40bfca744dd0c87df6ec2ab776f982636e4b0904.zip |
Merge pull request #25183 from llllvvuu/fix/marktree_move
fix(marktree): off-by-one error in `marktree_move`
Diffstat (limited to 'test/functional/api/extmark_spec.lua')
-rw-r--r-- | test/functional/api/extmark_spec.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua index a917432dab..c4449bc201 100644 --- a/test/functional/api/extmark_spec.lua +++ b/test/functional/api/extmark_spec.lua @@ -208,6 +208,23 @@ describe('API/extmarks', function() eq({}, get_extmarks(ns2, {0, 0}, {-1, -1})) end) + it('can undo with extmarks (#25147)', function() + feed('itest<esc>') + set_extmark(ns, 1, 0, 0) + set_extmark(ns, 2, 1, 0) + eq({ { 1, 0, 0 }, { 2, 1, 0 } }, get_extmarks(ns, {0, 0}, {-1, -1})) + feed('dd') + eq({ { 1, 1, 0 }, { 2, 1, 0 } }, get_extmarks(ns, {0, 0}, {-1, -1})) + curbufmeths.clear_namespace(ns, 0, -1) + eq({}, get_extmarks(ns, {0, 0}, {-1, -1})) + set_extmark(ns, 1, 0, 0, { right_gravity = false }) + set_extmark(ns, 2, 1, 0, { right_gravity = false }) + eq({ { 1, 0, 0 }, { 2, 1, 0 } }, get_extmarks(ns, {0, 0}, {-1, -1})) + feed('u') + eq({ { 1, 0, 0 }, { 2, 1, 0 } }, get_extmarks(ns, {0, 0}, {-1, -1})) + curbufmeths.clear_namespace(ns, 0, -1) + end) + it('querying for information and ranges', function() --marks = {1, 2, 3} --positions = {{0, 0,}, {0, 2}, {0, 3}} |