Christian Brabandt wrote: > On Sa, 20 Okt 2012, Bram Moolenaar wrote: > > > > Michael Henry wrote: > > > > > The :sandbox command seems to disallow the use of :setlocal, > > > even though it permits changing buffer-local options via :set. > > > For example, this works fine: > > > > > > vim -u NONE '+set nocp | sandbox set ts=16' > > > > > > But this fails: > > > > > > vim -u NONE '+set nocp | sandbox setlocal ts=16' > > > > > > It generate the following error message: > > > > > > Error detected while processing command line: > > > E48: Not allowed in sandbox: sandbox setlocal ts=16 > > > > > > I was expecting :setlocal would work with :sandbox; should it? > > > > Yes, that appears to be a bug. Not all options can be changed, for > > safety, but if :set works when :setlocal should also work. > > Here is a patch: > diff --git a/src/ex_cmds.h b/src/ex_cmds.h > --- a/src/ex_cmds.h > +++ b/src/ex_cmds.h > @@ -832,9 +832,9 @@ > EX(CMD_setfiletype, "setfiletype", ex_setfiletype, > TRLBAR|EXTRA|NEEDARG|CMDWIN), > EX(CMD_setglobal, "setglobal", ex_set, > - TRLBAR|EXTRA|CMDWIN), > + TRLBAR|EXTRA|CMDWIN|SBOXOK), > EX(CMD_setlocal, "setlocal", ex_set, > - TRLBAR|EXTRA|CMDWIN), > + TRLBAR|EXTRA|CMDWIN|SBOXOK), > EX(CMD_sfind, "sfind", ex_splitview, > BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), > EX(CMD_sfirst, "sfirst", ex_rewind,
Thanks. Added to the todo list. Strange that nobody remarked upon this before. -- hundred-and-one symptoms of being an internet addict: 9. All your daydreaming is preoccupied with getting a faster connection to the net: 28.8...ISDN...cable modem...T1...T3. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php