diff options
| author | skewb1k <skewb1kunix@gmail.com> | 2026-03-21 16:00:06 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-21 12:00:06 -0400 |
| commit | 4d3a67cd620152d11ab9b5f5bdd973f84cc2d44b (patch) | |
| tree | 7cb842e9c15abdfb11d16038ee51c18ace4f7d37 /test/functional/lua/vim_spec.lua | |
| parent | a969e922497d786ec2fb659978a5d4649c72e6be (diff) | |
| download | rneovim-4d3a67cd620152d11ab9b5f5bdd973f84cc2d44b.tar.gz rneovim-4d3a67cd620152d11ab9b5f5bdd973f84cc2d44b.tar.bz2 rneovim-4d3a67cd620152d11ab9b5f5bdd973f84cc2d44b.zip | |
feat(lua): replace `buffer` with `buf` in vim.keymap.set/del #38360
The `buffer` option remains functional but is now undocumented.
Providing both will raise an error. Since providing `buf` was disallowed
before, there is no code that will break due to using `buffer` alongside
`buf`.
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
| -rw-r--r-- | test/functional/lua/vim_spec.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index 049398fc74..ac40a95c75 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -3178,7 +3178,7 @@ describe('vim.keymap', function() 0, exec_lua [[ GlobalCount = 0 - vim.keymap.set('n', 'asdf', function() GlobalCount = GlobalCount + 1 end, {buffer=true}) + vim.keymap.set('n', 'asdf', function() GlobalCount = GlobalCount + 1 end, {buf=true}) return GlobalCount ]] ) @@ -3188,7 +3188,7 @@ describe('vim.keymap', function() eq(1, exec_lua [[return GlobalCount]]) exec_lua [[ - vim.keymap.del('n', 'asdf', {buffer=true}) + vim.keymap.del('n', 'asdf', {buf=true}) ]] feed('asdf\n') @@ -3201,16 +3201,16 @@ describe('vim.keymap', function() eq( true, exec_lua [[ - opts = {buffer=true} + opts = {buf=true} vim.keymap.set('n', 'asdf', function() end, opts) - return opts.buffer + return opts.buf ]] ) eq( true, exec_lua [[ vim.keymap.del('n', 'asdf', opts) - return opts.buffer + return opts.buf ]] ) end) |