neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b15b22fc73bed0629f0a95fdc1aa9f9160ad215c
parent 653871da1b5507d3391239854982438872ad4032
Author: Andrey Starodubtsev <andrey-starodubtsev@users.noreply.github.com>
Date:   Wed, 12 Nov 2025 07:57:09 +0200

fix(trust): :trust command on Windows #36509

`:trust` command calculated SHA-256 on file content reading it as a
text. While it doesn't matter on Unices, on Windows hash was calculated
incorectly. SHA-256 for buffer content was calculated fine though.

After this fix hashes in `%LOCALAPPDATA%/nvim-data/trust` are the same
as in output of `sha256sum -t`.
Diffstat:
Mruntime/lua/vim/secure.lua | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runtime/lua/vim/secure.lua b/runtime/lua/vim/secure.lua @@ -47,7 +47,7 @@ local function compute_hash(fullpath, bufnr) end else do - local f = io.open(fullpath, 'r') + local f = io.open(fullpath, 'rb') if not f then return nil, nil end