From 8402865cbad2e905bd841c3d9054f1027898e750 Mon Sep 17 00:00:00 2001 From: Shadman Date: Thu, 22 Apr 2021 17:02:02 +0600 Subject: lua: make vim.cmd an alias of vim.api.nvim_exec() (#14401) Previously vim.cmd was an alias of nvim_command(). From now on it is an alias of nvim_exec(). --- src/nvim/lua/vim.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/lua/vim.lua b/src/nvim/lua/vim.lua index eb54ff28ee..75e759094f 100644 --- a/src/nvim/lua/vim.lua +++ b/src/nvim/lua/vim.lua @@ -309,7 +309,9 @@ setmetatable(vim, { }) -- An easier alias for commands. -vim.cmd = vim.api.nvim_command +vim.cmd = function(command) + return vim.api.nvim_exec(command, false) +end -- These are the vim.env/v/g/o/bo/wo variable magic accessors. do -- cgit