aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/highlight_spec.lua
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-10-02 09:56:57 +0200
committerGitHub <noreply@github.com>2020-10-02 09:56:57 +0200
commitc10c2fab5b4509a7ff50526b56c669f30ebf87c9 (patch)
treecd8f28d2b559959e208f303cf1584934391efc61 /test/functional/api/highlight_spec.lua
parenta9851bfbb1bd442fa4fbe470e1c134a1b6e9b13f (diff)
parentf1b39f91a5be7f3bf61b0e0d129dce49d51ff360 (diff)
downloadrneovim-c10c2fab5b4509a7ff50526b56c669f30ebf87c9.tar.gz
rneovim-c10c2fab5b4509a7ff50526b56c669f30ebf87c9.tar.bz2
rneovim-c10c2fab5b4509a7ff50526b56c669f30ebf87c9.zip
Merge pull request #12968 from erw7/fix-substitute2
fix substitute problem with inccommand
Diffstat (limited to 'test/functional/api/highlight_spec.lua')
-rw-r--r--test/functional/api/highlight_spec.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/api/highlight_spec.lua b/test/functional/api/highlight_spec.lua
index a9d4c72d31..daf20c006c 100644
--- a/test/functional/api/highlight_spec.lua
+++ b/test/functional/api/highlight_spec.lua
@@ -7,6 +7,7 @@ local meths = helpers.meths
local funcs = helpers.funcs
local pcall_err = helpers.pcall_err
local ok = helpers.ok
+local assert_alive = helpers.assert_alive
describe('API: highlight',function()
local expected_rgb = {
@@ -145,4 +146,15 @@ describe('API: highlight',function()
eq({foreground=tonumber("0x888888"), background=tonumber("0x888888")},
meths.get_hl_by_name("Shrubbery", true))
end)
+
+ it("nvim_buf_add_highlight to other buffer doesn't crash if undo is disabled #12873", function()
+ command('vsplit file')
+ local err, _ = pcall(meths.buf_set_option, 1, 'undofile', false)
+ eq(true, err)
+ err, _ = pcall(meths.buf_set_option, 1, 'undolevels', -1)
+ eq(true, err)
+ err, _ = pcall(meths.buf_add_highlight, 1, -1, 'Question', 0, 0, -1)
+ eq(true, err)
+ assert_alive()
+ end)
end)