aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/extmark_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/api/extmark_spec.lua')
-rw-r--r--test/functional/api/extmark_spec.lua18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua
index 50b4b85d2a..a8f538b951 100644
--- a/test/functional/api/extmark_spec.lua
+++ b/test/functional/api/extmark_spec.lua
@@ -104,10 +104,10 @@ describe('API/extmarks', function()
it("can end extranges past final newline using end_col = 0", function()
set_extmark(ns, marks[1], 0, 0, {
end_col = 0,
- end_line = 1
+ end_row = 1
})
eq("end_col value outside range",
- pcall_err(set_extmark, ns, marks[2], 0, 0, { end_col = 1, end_line = 1 }))
+ pcall_err(set_extmark, ns, marks[2], 0, 0, { end_col = 1, end_row = 1 }))
end)
it('adds, updates and deletes marks', function()
@@ -420,7 +420,7 @@ describe('API/extmarks', function()
end)
it('marks move with open line', function()
- -- open_line in misc1.c
+ -- open_line in change.c
-- testing marks below are also moved
feed("yyP")
set_extmark(ns, marks[1], 0, 4)
@@ -489,7 +489,7 @@ describe('API/extmarks', function()
end)
it('marks move with line splits (using enter)', function()
- -- open_line in misc1.c
+ -- open_line in change.c
-- testing marks below are also moved
feed("yyP")
set_extmark(ns, marks[1], 0, 4)
@@ -500,7 +500,7 @@ describe('API/extmarks', function()
end)
it('marks at last line move on insert new line', function()
- -- open_line in misc1.c
+ -- open_line in change.c
set_extmark(ns, marks[1], 0, 4)
feed('0i<cr><esc>')
check_undo_redo(ns, marks[1], 0, 4, 1, 4)
@@ -1424,6 +1424,14 @@ describe('API/extmarks', function()
eq({ {1, 0, 0}, {2, 0, 8} },
meths.buf_get_extmarks(0, ns, 0, -1, {}))
end)
+
+ it('can accept "end_row" or "end_line" #16548', function()
+ set_extmark(ns, marks[1], 0, 0, {
+ end_col = 0,
+ end_line = 1
+ })
+ eq({ {1, 0, 0, { end_col = 0, end_row = 1 }} }, get_extmarks(ns, 0, -1, {details=true}))
+ end)
end)
describe('Extmarks buffer api with many marks', function()