diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-01-21 14:01:40 +0100 |
---|---|---|
committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-09-03 10:23:52 +0200 |
commit | d3302573ba5f117fe7e1316be27321c3d9ffd261 (patch) | |
tree | df3aed86ae921d57bc520faeb18f2316b49ff540 /test/functional/api/extmark_spec.lua | |
parent | 54ce1010e86cbb29067aabfc332dab59b5a88edb (diff) | |
download | rneovim-d3302573ba5f117fe7e1316be27321c3d9ffd261.tar.gz rneovim-d3302573ba5f117fe7e1316be27321c3d9ffd261.tar.bz2 rneovim-d3302573ba5f117fe7e1316be27321c3d9ffd261.zip |
extmark: move id to dict in nvim_buf_set_extmark
Diffstat (limited to 'test/functional/api/extmark_spec.lua')
-rw-r--r-- | test/functional/api/extmark_spec.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua index 9ea35e50a2..4bdff1a768 100644 --- a/test/functional/api/extmark_spec.lua +++ b/test/functional/api/extmark_spec.lua @@ -32,7 +32,10 @@ local function set_extmark(ns_id, id, line, col, opts) if opts == nil then opts = {} end - return curbufmeths.set_extmark(ns_id, id, line, col, opts) + if id ~= nil and id ~= 0 then + opts.id = id + end + return curbufmeths.set_extmark(ns_id, line, col, opts) end local function get_extmarks(ns_id, start, end_, opts) @@ -1357,14 +1360,14 @@ describe('API/extmarks', function() it('can set a mark to other buffer', function() local buf = request('nvim_create_buf', 0, 1) request('nvim_buf_set_lines', buf, 0, -1, 1, {"", ""}) - local id = bufmeths.set_extmark(buf, ns, 0, 1, 0, {}) + local id = bufmeths.set_extmark(buf, ns, 1, 0, {}) eq({{id, 1, 0}}, bufmeths.get_extmarks(buf, ns, 0, -1, {})) end) it('does not crash with append/delete/undo seqence', function() meths.exec([[ let ns = nvim_create_namespace('myplugin') - call nvim_buf_set_extmark(0, ns, 0, 0, 0, {}) + call nvim_buf_set_extmark(0, ns, 0, 0, {}) call append(0, '') %delete undo]],false) |