Patch 9.0.1596

5 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 1, 2023, 7:47:37 AM6/1/23
to vim...@googlegroups.com

Patch 9.0.1596
Problem: :registers command does not work in sandbox.
Solution: Add flag to the command. (closes #12473)
Files: src/ex_cmds.h, src/testdir/test_registers.vim


*** ../vim-9.0.1595/src/ex_cmds.h 2023-01-27 13:16:14.670850401 +0000
--- src/ex_cmds.h 2023-06-01 12:41:07.447910816 +0100
***************
*** 1286,1292 ****
EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
EXCMD(CMD_registers, "registers", ex_display,
! EX_EXTRA|EX_NOTRLCOM|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
EXCMD(CMD_resize, "resize", ex_resize,
EX_RANGE|EX_TRLBAR|EX_WORD1|EX_CMDWIN|EX_LOCK_OK,
--- 1286,1292 ----
EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
EXCMD(CMD_registers, "registers", ex_display,
! EX_EXTRA|EX_NOTRLCOM|EX_TRLBAR|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK,
ADDR_NONE),
EXCMD(CMD_resize, "resize", ex_resize,
EX_RANGE|EX_TRLBAR|EX_WORD1|EX_CMDWIN|EX_LOCK_OK,
*** ../vim-9.0.1595/src/testdir/test_registers.vim 2023-05-09 17:09:25.657491200 +0100
--- src/testdir/test_registers.vim 2023-06-01 11:54:09.823182365 +0100
***************
*** 51,58 ****
call feedkeys("i\<C-R>=2*4\n\<esc>")
call feedkeys(":ls\n", 'xt')

! let a = execute('display')
! let b = execute('registers')

call assert_equal(a, b)
call assert_match('^\nType Name Content\n'
--- 51,59 ----
call feedkeys("i\<C-R>=2*4\n\<esc>")
call feedkeys(":ls\n", 'xt')

! " 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'
*** ../vim-9.0.1595/src/version.c 2023-05-31 18:57:10.513953154 +0100
--- src/version.c 2023-06-01 12:42:43.623812020 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1596,
/**/

--
I AM THANKFUL...
...for a lawn that needs mowing, windows that need cleaning
and gutters that need fixing because it means I have a home.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages