Hi Bram!
On Do, 25 Aug 2016, Bram Moolenaar wrote:
>
> Christian Brabandt wrote:
>
> > now that we have the async and timer feature, wouldn't it make sense to
> > have a way to check, whether Vim is in sandbox mode, so that some
> > functions don't randomly trigger E48 errors and can check, whether it is
> > okay to be executed?
>
> It would be easy to add a function for this. But before we do, can you
> give an example of how it would be used?
Well, I use a plugin for sporadically saving unsaved buffers. This uses
the new timers functionality and internally uses bufdo to run over all
buffers. Now unfortunately this was triggered once I debugged a Vim
script (so the sandbox was active).
Now I could of course use :try/catch, but I rather like to avoid doing
anything, if I am in the sandbox. But perhaps, I should instead switch
to using writefile() and bufnr() instead of using :bufdo :w
Best,
Christian
--
Die Menschen werden an sich und andern irre, weil sie die Mittel
als Zweck behandeln, da denn vor lauter Tätigkeit gar nichts
geschieht oder vielleicht gar das Widerwärtige.
-- Goethe, Maximen und Reflektionen, Nr. 39
--
--
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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.