neovim

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

commit 78010910625aab8ef41658f35fc1fa68162f6852
parent 2bdef6dd2a7572602aeb2efec76812769bcee246
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Thu,  1 Jun 2023 20:28:16 +0800

vim-patch:9.0.1596: :registers command does not work in sandbox (#23866)

Problem:    :registers command does not work in sandbox.
Solution:   Add flag to the command. (closes vim/vim#12473)

https://github.com/vim/vim/commit/eb43b7f0531bd13d15580b5c262a25d6a52a0823

Co-authored-by: Julio B <julio.bacel@gmail.com>
Diffstat:
Msrc/nvim/ex_cmds.lua | 2+-
Mtest/old/testdir/test_registers.vim | 5+++--
2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua @@ -2212,7 +2212,7 @@ module.cmds = { }, { command='registers', - flags=bit.bor(EXTRA, NOTRLCOM, TRLBAR, CMDWIN, LOCK_OK), + flags=bit.bor(EXTRA, NOTRLCOM, TRLBAR, SBOXOK, CMDWIN, LOCK_OK), addr_type='ADDR_NONE', func='ex_display', }, diff --git a/test/old/testdir/test_registers.vim b/test/old/testdir/test_registers.vim @@ -55,8 +55,9 @@ func Test_display_registers() call feedkeys("i\<C-R>=2*4\n\<esc>") call feedkeys(":ls\n", 'xt') - let a = execute('display') - let b = execute('registers') + " these commands work in the sandbox + let a = execute('sandbox display') + let b = execute('sandbox registers') call assert_equal(a, b) call assert_match('^\nType Name Content\n'