From cb6672853a0df3dbe5202621d818ef1c2da7432c Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 11 May 2018 20:59:53 +0200 Subject: API: nvim_get_commands(): builtin is irrelevant for buffer-local builtin commands are never buffer-local, so we can return empty for that case. --- test/functional/api/command_spec.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/functional/api/command_spec.lua b/test/functional/api/command_spec.lua index 149a5dd111..c7cf081355 100644 --- a/test/functional/api/command_spec.lua +++ b/test/functional/api/command_spec.lua @@ -19,7 +19,7 @@ describe('nvim_get_commands', function() end) it('validates input', function() - expect_err('builtin commands not supported yet', meths.get_commands, + expect_err('builtin=true not implemented', meths.get_commands, {builtin=true}) expect_err('unexpected key: foo', meths.get_commands, {foo='blah'}) @@ -47,6 +47,9 @@ describe('nvim_get_commands', function() -- Delete a command. command('delcommand Pwd') eq({cmd_dict}, curbufmeths.get_commands({builtin=false})) + + -- {builtin=true} always returns empty for buffer-local case. + eq({}, curbufmeths.get_commands({builtin=true})) end) it('gets various command attributes', function() -- cgit