diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-01 20:28:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 20:28:16 +0800 |
commit | 78010910625aab8ef41658f35fc1fa68162f6852 (patch) | |
tree | 4c47b6661b7060b4ff2f7d5cd2a82b39b7c94542 | |
parent | 2bdef6dd2a7572602aeb2efec76812769bcee246 (diff) | |
download | rneovim-78010910625aab8ef41658f35fc1fa68162f6852.tar.gz rneovim-78010910625aab8ef41658f35fc1fa68162f6852.tar.bz2 rneovim-78010910625aab8ef41658f35fc1fa68162f6852.zip |
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>
-rw-r--r-- | src/nvim/ex_cmds.lua | 2 | ||||
-rw-r--r-- | test/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 index b0938fa711..88f3bc0b43 100644 --- 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 index bbf1aa53b5..70dac535b4 100644 --- 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' |