mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
vim-patch:7.4.2333
Problem: Outdated comments in test.
Solution: Cleanup normal mode test. (Christian Brabandt)
31845093b7
This commit is contained in:
@@ -3847,6 +3847,7 @@ fex_format (
|
||||
int use_sandbox = was_set_insecurely((char_u *)"formatexpr",
|
||||
OPT_LOCAL);
|
||||
int r;
|
||||
char_u *fex;
|
||||
|
||||
/*
|
||||
* Set v:lnum to the first line number and v:count to the number of lines.
|
||||
@@ -3856,16 +3857,22 @@ fex_format (
|
||||
set_vim_var_nr(VV_COUNT, (varnumber_T)count);
|
||||
set_vim_var_char(c);
|
||||
|
||||
// Make a copy, the option could be changed while calling it.
|
||||
fex = vim_strsave(curbuf->b_p_fex);
|
||||
if (fex == NULL) {
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* Evaluate the function.
|
||||
*/
|
||||
if (use_sandbox)
|
||||
++sandbox;
|
||||
r = eval_to_number(curbuf->b_p_fex);
|
||||
r = (int)eval_to_number(fex);
|
||||
if (use_sandbox)
|
||||
--sandbox;
|
||||
|
||||
set_vim_var_string(VV_CHAR, NULL, -1);
|
||||
xfree(fex);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
Reference in New Issue
Block a user