Mercurial > vim
diff src/misc1.c @ 634:1c586ee8dd45 v7.0183
updated for version 7.0183
author | vimboss |
---|---|
date | Fri, 20 Jan 2006 23:10:18 +0000 |
parents | 732c7ae5743e |
children | 83a006f81bac |
line wrap: on
line diff
--- a/src/misc1.c +++ b/src/misc1.c @@ -7673,12 +7673,17 @@ get_expr_indent() int indent; pos_T pos; int save_State; + int use_sandbox = was_set_insecurely((char_u *)"indentexpr"); pos = curwin->w_cursor; set_vim_var_nr(VV_LNUM, curwin->w_cursor.lnum); - ++sandbox; + if (use_sandbox) + ++sandbox; + ++textlock; indent = eval_to_number(curbuf->b_p_inde); - --sandbox; + if (use_sandbox) + --sandbox; + --textlock; /* Restore the cursor position so that 'indentexpr' doesn't need to. * Pretend to be in Insert mode, allow cursor past end of line for "o"