summaryrefslogtreecommitdiff
path: root/src/gui_beval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-01-20 23:10:18 +0000
committerBram Moolenaar <Bram@vim.org>2006-01-20 23:10:18 +0000
commitb71eaaeaa8193b0cbb67496de6ad16ced80b8b09 (patch)
tree29e50b81ba2e1352e1f1940398e1b3507b8ea2c6 /src/gui_beval.c
parent2d3f489e09a1cc50f5b7601eff568a4eb87fbd51 (diff)
downloadvim-git-b71eaaeaa8193b0cbb67496de6ad16ced80b8b09.tar.gz
updated for version 7.0183v7.0183
Diffstat (limited to 'src/gui_beval.c')
-rw-r--r--src/gui_beval.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui_beval.c b/src/gui_beval.c
index 290f388b8..755f94310 100644
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -23,6 +23,7 @@ general_beval_cb(beval, state)
{
win_T *wp;
int col;
+ int use_sandbox;
linenr_T lnum;
char_u *text;
static char_u *result = NULL;
@@ -50,10 +51,17 @@ general_beval_cb(beval, state)
set_vim_var_string(VV_BEVAL_TEXT, text, -1);
vim_free(text);
- ++sandbox;
+ use_sandbox = was_set_insecurely((char_u *)"balloonexpr");
+ if (use_sandbox)
+ ++sandbox;
+ ++textlock;
+
vim_free(result);
result = eval_to_string(p_bexpr, NULL);
- --sandbox;
+
+ if (use_sandbox)
+ --sandbox;
+ --textlock;
set_vim_var_string(VV_BEVAL_TEXT, NULL, -1);
if (result != NULL && result[0] != NUL)