aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/extmark_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-09-12 11:16:35 +0200
committerGitHub <noreply@github.com>2023-09-12 11:16:35 +0200
commit1c4a93b591828bc6970edad6282c004eb46f0b2d (patch)
tree2f2a403f8b0132976dfe0a61eb78f65028329cdd /test/functional/api/extmark_spec.lua
parent6b5f44817e93c2985f3ea32122f1dc0047054018 (diff)
parentb04286a187d57c50f01cd36cd4668b7a69026579 (diff)
downloadrneovim-1c4a93b591828bc6970edad6282c004eb46f0b2d.tar.gz
rneovim-1c4a93b591828bc6970edad6282c004eb46f0b2d.tar.bz2
rneovim-1c4a93b591828bc6970edad6282c004eb46f0b2d.zip
Merge pull request #13243 from bfredl/intersection
feat(extmark): support highlighting and querying multiline ranges
Diffstat (limited to 'test/functional/api/extmark_spec.lua')
-rw-r--r--test/functional/api/extmark_spec.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua
index 6d8e3d8e0a..a917432dab 100644
--- a/test/functional/api/extmark_spec.lua
+++ b/test/functional/api/extmark_spec.lua
@@ -753,7 +753,14 @@ describe('API/extmarks', function()
})
end)
- -- TODO(bfredl): add more tests!
+ it('can get overlapping extmarks', function()
+ set_extmark(ns, 1, 0, 0, {end_row = 5, end_col=0})
+ set_extmark(ns, 2, 2, 5, {end_row = 2, end_col=30})
+ set_extmark(ns, 3, 0, 5, {end_row = 2, end_col=10})
+ set_extmark(ns, 4, 0, 0, {end_row = 1, end_col=0})
+ eq({{ 2, 2, 5 }}, get_extmarks(ns, {2, 0}, {2, -1}, { overlap=false }))
+ eq({{ 1, 0, 0 }, { 3, 0, 5}, {2, 2, 5}}, get_extmarks(ns, {2, 0}, {2, -1}, { overlap=true }))
+ end)
end)
it('replace works', function()