diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-11-03 10:06:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-03 10:06:41 +0800 |
commit | 3075c69ff02faf396e5efbdcb4a255b0b0309649 (patch) | |
tree | 1d02f7488d7a98a518852b202e15897d58252d6f /src/nvim/option.c | |
parent | ed3fb1bb9ad97435c50655ee8de71b2d7d67d01c (diff) | |
download | rneovim-3075c69ff02faf396e5efbdcb4a255b0b0309649.tar.gz rneovim-3075c69ff02faf396e5efbdcb4a255b0b0309649.tar.bz2 rneovim-3075c69ff02faf396e5efbdcb4a255b0b0309649.zip |
vim-patch:9.1.0831: 'findexpr' can't be used as lambad or Funcref (#31058)
Problem: 'findexpr' can't be used for lambads
(Justin Keyes)
Solution: Replace the findexpr option with the findfunc option
(Yegappan Lakshmanan)
related: vim/vim#15905
closes: vim/vim#15976
https://github.com/vim/vim/commit/a13f3a4f5de9c150f70298850e34747838904995
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index a7e56d6d39..5d2e1ce4c6 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -578,6 +578,7 @@ void free_all_options(void) } free_operatorfunc_option(); free_tagfunc_option(); + free_findfunc_option(); XFREE_CLEAR(fenc_default); XFREE_CLEAR(p_term); XFREE_CLEAR(p_ttytype); @@ -4472,8 +4473,8 @@ void *get_varp_scope_from(vimoption_T *p, int scope, buf_T *buf, win_T *win) switch ((int)p->indir) { case PV_FP: return &(buf->b_p_fp); - case PV_FEXPR: - return &(buf->b_p_fexpr); + case PV_FFU: + return &(buf->b_p_ffu); case PV_EFM: return &(buf->b_p_efm); case PV_GP: @@ -4595,8 +4596,8 @@ void *get_varp_from(vimoption_T *p, buf_T *buf, win_T *win) return *buf->b_p_tsrfu != NUL ? &(buf->b_p_tsrfu) : p->var; case PV_FP: return *buf->b_p_fp != NUL ? &(buf->b_p_fp) : p->var; - case PV_FEXPR: - return *buf->b_p_fexpr != NUL ? &(buf->b_p_fexpr) : p->var; + case PV_FFU: + return *buf->b_p_ffu != NUL ? &(buf->b_p_ffu) : p->var; case PV_EFM: return *buf->b_p_efm != NUL ? &(buf->b_p_efm) : p->var; case PV_GP: @@ -4868,13 +4869,13 @@ char *get_equalprg(void) return curbuf->b_p_ep; } -/// Get the value of 'findexpr', either the buffer-local one or the global one. -char *get_findexpr(void) +/// Get the value of 'findfunc', either the buffer-local one or the global one. +char *get_findfunc(void) { - if (*curbuf->b_p_fexpr == NUL) { - return p_fexpr; + if (*curbuf->b_p_ffu == NUL) { + return p_ffu; } - return curbuf->b_p_fexpr; + return curbuf->b_p_ffu; } /// Copy options from one window to another. @@ -5275,8 +5276,7 @@ void buf_copy_options(buf_T *buf, int flags) buf->b_p_mp = empty_string_option; buf->b_p_efm = empty_string_option; buf->b_p_ep = empty_string_option; - buf->b_p_fexpr = xstrdup(p_fexpr); - COPY_OPT_SCTX(buf, BV_FEXPR); + buf->b_p_ffu = empty_string_option; buf->b_p_kp = empty_string_option; buf->b_p_path = empty_string_option; buf->b_p_tags = empty_string_option; |