diff options
author | jadedpasta <86900272+jadedpasta@users.noreply.github.com> | 2021-07-04 02:14:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 00:14:39 -0700 |
commit | 490615612ed5ec587c8023de28db495b3181de30 (patch) | |
tree | 06ca9e683c3b7df087cf635f3e46de277f5ffbb2 /test/functional/lua/vim_spec.lua | |
parent | 75f758b993b842c4afd03fdaa0063b573fdf8751 (diff) | |
download | rneovim-490615612ed5ec587c8023de28db495b3181de30.tar.gz rneovim-490615612ed5ec587c8023de28db495b3181de30.tar.bz2 rneovim-490615612ed5ec587c8023de28db495b3181de30.zip |
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.lua | 4 |
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) |