aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/mark_extended_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-11-16 12:01:53 +0100
committerGitHub <noreply@github.com>2019-11-16 12:01:53 +0100
commit18096631b160e136a07cc56bf29fe6a82d277fd5 (patch)
tree41089d7a998d36e3f955fbdcd46d0bebc229080e /test/functional/api/mark_extended_spec.lua
parentd79164c9f9ffbb17b82b3a523e217e61f43697be (diff)
parentebdf90e7d7c97b4355f42e06769e9424c279d695 (diff)
downloadrneovim-18096631b160e136a07cc56bf29fe6a82d277fd5.tar.gz
rneovim-18096631b160e136a07cc56bf29fe6a82d277fd5.tar.bz2
rneovim-18096631b160e136a07cc56bf29fe6a82d277fd5.zip
Merge pull request #11399 from bfredl/markundo
extmark: do not crash in read-only buffer
Diffstat (limited to 'test/functional/api/mark_extended_spec.lua')
-rw-r--r--test/functional/api/mark_extended_spec.lua6
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()