Skip to content

Commit eb43b7f

Browse files
julio-bbrammool
authored andcommitted
patch 9.0.1596: :registers command does not work in sandbox
Problem: :registers command does not work in sandbox. Solution: Add flag to the command. (closes #12473)
1 parent e84c773 commit eb43b7f

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/ex_cmds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,7 +1286,7 @@ EXCMD(CMD_redrawtabline, "redrawtabline", ex_redrawtabline,
12861286
EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
12871287
ADDR_NONE),
12881288
EXCMD(CMD_registers, "registers", ex_display,
1289-
EX_EXTRA|EX_NOTRLCOM|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK,
1289+
EX_EXTRA|EX_NOTRLCOM|EX_TRLBAR|EX_SBOXOK|EX_CMDWIN|EX_LOCK_OK,
12901290
ADDR_NONE),
12911291
EXCMD(CMD_resize, "resize", ex_resize,
12921292
EX_RANGE|EX_TRLBAR|EX_WORD1|EX_CMDWIN|EX_LOCK_OK,

src/testdir/test_registers.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ func Test_display_registers()
5151
call feedkeys("i\<C-R>=2*4\n\<esc>")
5252
call feedkeys(":ls\n", 'xt')
5353

54-
let a = execute('display')
55-
let b = execute('registers')
54+
" these commands work in the sandbox
55+
let a = execute('sandbox display')
56+
let b = execute('sandbox registers')
5657

5758
call assert_equal(a, b)
5859
call assert_match('^\nType Name Content\n'

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ static char *(features[]) =
695695

696696
static int included_patches[] =
697697
{ /* Add new patch number below this line */
698+
/**/
699+
1596,
698700
/**/
699701
1595,
700702
/**/

0 commit comments

Comments
 (0)