diff options
author | notomo <notomo.motono@gmail.com> | 2019-11-26 00:50:30 +0900 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-11-25 16:50:30 +0100 |
commit | 4a77df2e518a51ffd5a5fe311424b4b5305009a7 (patch) | |
tree | 759b67bb670652b298bd85361cd6807d22c3d190 /test/functional/api/mark_extended_spec.lua | |
parent | fd5710ae9a3bcbc0f9cbb71de9e39253350ff09c (diff) | |
download | rneovim-4a77df2e518a51ffd5a5fe311424b4b5305009a7.tar.gz rneovim-4a77df2e518a51ffd5a5fe311424b4b5305009a7.tar.bz2 rneovim-4a77df2e518a51ffd5a5fe311424b4b5305009a7.zip |
[RFC] extmark: fix E315 in nvim_buf_set_extmark (#11449)
extmark: need to use buf instead of curbuf
Diffstat (limited to 'test/functional/api/mark_extended_spec.lua')
-rw-r--r-- | test/functional/api/mark_extended_spec.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/api/mark_extended_spec.lua b/test/functional/api/mark_extended_spec.lua index 6735b8c0f5..edb0f8ac2b 100644 --- a/test/functional/api/mark_extended_spec.lua +++ b/test/functional/api/mark_extended_spec.lua @@ -5,6 +5,7 @@ local request = helpers.request local eq = helpers.eq local ok = helpers.ok local curbufmeths = helpers.curbufmeths +local bufmeths = helpers.bufmeths local pcall_err = helpers.pcall_err local insert = helpers.insert local feed = helpers.feed @@ -1274,6 +1275,13 @@ describe('API/extmarks', function() local id = set_extmark(ns, 0, 0, 2) eq({{id, 0, 2}}, get_extmarks(ns,0, -1)) end) + + 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, {}) + eq({{id, 1, 0}}, bufmeths.get_extmarks(buf, ns, 0, -1, {})) + end) end) describe('Extmarks buffer api with many marks', function() |