aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/textformat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/textformat.c')
-rw-r--r--src/nvim/textformat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/textformat.c b/src/nvim/textformat.c
index 9095d4e8c9..06b3aa0411 100644
--- a/src/nvim/textformat.c
+++ b/src/nvim/textformat.c
@@ -863,7 +863,7 @@ int fex_format(linenr_T lnum, long count, int c)
// Make a copy, the option could be changed while calling it.
char *fex = xstrdup(curbuf->b_p_fex);
- current_sctx = curbuf->b_p_script_ctx[BV_FEX].script_ctx;
+ current_sctx = curbuf->b_p_script_ctx[kBufOptFormatexpr].script_ctx;
// Evaluate the function.
if (use_sandbox) {