aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/secure.lua
diff options
context:
space:
mode:
authoranondeveg <anondeveg@gmail.com>2026-02-26 04:55:05 +0200
committerGitHub <noreply@github.com>2026-02-25 20:55:05 -0600
commit6ba32713ada1c290aa8ff0cfcf69c3cbb14d59d4 (patch)
tree265b63953ca25782db323f804ebecf7cb53fe09a /runtime/lua/vim/secure.lua
parente86ccdbeaefd56398bfe7e5927e076348733a868 (diff)
downloadrneovim-6ba32713ada1c290aa8ff0cfcf69c3cbb14d59d4.tar.gz
rneovim-6ba32713ada1c290aa8ff0cfcf69c3cbb14d59d4.tar.bz2
rneovim-6ba32713ada1c290aa8ff0cfcf69c3cbb14d59d4.zip
feat(secure): allow 'path' parameter for trust action 'allow' (#38001)
Diffstat (limited to 'runtime/lua/vim/secure.lua')
-rw-r--r--runtime/lua/vim/secure.lua5
1 files changed, 0 insertions, 5 deletions
diff --git a/runtime/lua/vim/secure.lua b/runtime/lua/vim/secure.lua
index a2884f84dc..784b4d5ff0 100644
--- a/runtime/lua/vim/secure.lua
+++ b/runtime/lua/vim/secure.lua
@@ -168,7 +168,6 @@ end
--- @field action 'allow'|'deny'|'remove'
---
--- Path to a file to update. Mutually exclusive with {bufnr}.
---- Cannot be used when {action} is "allow".
--- @field path? string
--- Buffer number to update. Mutually exclusive with {path}.
--- @field bufnr? integer
@@ -195,10 +194,6 @@ function M.trust(opts)
assert(not path or not bufnr, '"path" and "bufnr" are mutually exclusive')
- if action == 'allow' then
- assert(not path, '"path" is not valid when action is "allow"')
- end
-
local fullpath ---@type string?
if path then
fullpath = vim.uv.fs_realpath(vim.fs.normalize(path))