diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-11-16 11:05:56 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-11-16 11:58:32 +0100 |
commit | ebdf90e7d7c97b4355f42e06769e9424c279d695 (patch) | |
tree | 681a719ace16ffcb1e7618d45b584843b3eab324 /test/functional/api | |
parent | 6222cca36adbf09109987e27e58d025a00020f3a (diff) | |
download | rneovim-ebdf90e7d7c97b4355f42e06769e9424c279d695.tar.gz rneovim-ebdf90e7d7c97b4355f42e06769e9424c279d695.tar.bz2 rneovim-ebdf90e7d7c97b4355f42e06769e9424c279d695.zip |
extmark: don't crash in RO buffer.
Diffstat (limited to 'test/functional/api')
-rw-r--r-- | test/functional/api/mark_extended_spec.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/api/mark_extended_spec.lua b/test/functional/api/mark_extended_spec.lua index a5d68c6b9f..76db9f9d81 100644 --- a/test/functional/api/mark_extended_spec.lua +++ b/test/functional/api/mark_extended_spec.lua @@ -1262,6 +1262,12 @@ describe('Extmarks buffer api', function() check_undo_redo(ns, marks[1], 3, 4, 2, 6) end) + it('in read-only buffer', function() + command("view! runtime/doc/help.txt") + eq(true, curbufmeths.get_option('ro')) + local id = set_extmark(ns, 0, 0, 2) + eq({{id, 0, 2}}, get_extmarks(ns,0, -1)) + end) end) describe('Extmarks buffer api with many marks', function() |