]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1596: :registers command does not work in sandbox v9.0.1596
authorJulio B <julio.bacel@gmail.com>
Thu, 1 Jun 2023 11:45:22 +0000 (12:45 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 1 Jun 2023 11:45:22 +0000 (12:45 +0100)
Problem:    :registers command does not work in sandbox.
Solution:   Add flag to the command. (closes #12473)

src/ex_cmds.h
src/testdir/test_registers.vim
src/version.c

index 325fee569ba721619a42dbfb5d111c52c9125b08..af13510492e8533325dd1d865c344b76cb67babb 100644 (file)
@@ -1286,7 +1286,7 @@ EXCMD(CMD_redrawtabline, "redrawtabline", ex_redrawtabline,
        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,
+       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,
index 33ea0f4bd3e6c889965aab5d6b963fc43d5861f5..46142d681b122f103cc8eb770d46cd844897db54 100644 (file)
@@ -51,8 +51,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'
index 4b041937dcc1f44b5dae965b8b8afffbb2f35cf7..132a0d96f9f8989bd050f7a3814b5ef238d9a04b 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1596,
 /**/
     1595,
 /**/