aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/vim_spec.lua
diff options
context:
space:
mode:
authorjadedpasta <86900272+jadedpasta@users.noreply.github.com>2021-07-04 02:14:39 -0500
committerSean Dewar <seandewar@users.noreply.github.com>2021-09-14 13:15:38 +0100
commitae89330ec0479cfa9eaaa2b64d8164e3309a1fea (patch)
tree20ec328d05f7cb11157c6f2aec0ffc80fd0a7e35 /test/functional/lua/vim_spec.lua
parent2229e99ef918ad82c4d20d654b0299195f0ed15c (diff)
downloadrneovim-ae89330ec0479cfa9eaaa2b64d8164e3309a1fea.tar.gz
rneovim-ae89330ec0479cfa9eaaa2b64d8164e3309a1fea.tar.bz2
rneovim-ae89330ec0479cfa9eaaa2b64d8164e3309a1fea.zip
backport: fix(vim.opt): vimL map string values not trimmed (#14982)
Options formatted as a list of comma-separated key-value pairs may have values that contain leading and trailing whitespace characters. For example, the `listchars` option has a default value of `"tab:> ,trail:-,nbsp:+"`. When converting this value to a lua table, leading and trailing whitespace should not be trimmed. Co-authored-by: Robert Hrusecky <robert.hrusecky@utexas.edu>
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r--test/functional/lua/vim_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index eff838aea3..976e63b44d 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -1332,12 +1332,12 @@ describe('lua stdlib', function()
it('should work for key-value pair options', function()
local listchars = exec_lua [[
- vim.opt.listchars = "tab:>~,space:_"
+ vim.opt.listchars = "tab:> ,space:_"
return vim.opt.listchars:get()
]]
eq({
- tab = ">~",
+ tab = "> ",
space = "_",
}, listchars)
end)