diff options
author | Shadman <shadmansaleh3@gmail.com> | 2021-04-22 17:02:02 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-22 13:02:02 +0200 |
commit | 8402865cbad2e905bd841c3d9054f1027898e750 (patch) | |
tree | 058166c92069a76e96fe3a798eebe97dba15f4aa | |
parent | 4570d04b16b4de0731455681f4db4bd27c77fc4c (diff) | |
download | rneovim-8402865cbad2e905bd841c3d9054f1027898e750.tar.gz rneovim-8402865cbad2e905bd841c3d9054f1027898e750.tar.bz2 rneovim-8402865cbad2e905bd841c3d9054f1027898e750.zip |
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().
-rw-r--r-- | src/nvim/lua/vim.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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 |