diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-04-01 18:12:55 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-05 19:35:56 +0800 |
commit | b92ed35a0bb873589bba9b51fdb92ffd00dc3e57 (patch) | |
tree | 5ac84e14882b16d6bd515eacec248ca01b8947d0 /src/nvim/option.c | |
parent | 3e60b9f1cc7a24e801d1ee38b4d03032cc6962f2 (diff) | |
download | rneovim-b92ed35a0bb873589bba9b51fdb92ffd00dc3e57.tar.gz rneovim-b92ed35a0bb873589bba9b51fdb92ffd00dc3e57.tar.bz2 rneovim-b92ed35a0bb873589bba9b51fdb92ffd00dc3e57.zip |
vim-patch:8.2.4093: cached breakindent values not initialized properly
Problem: Cached breakindent values not initialized properly.
Solution: Initialize and cache formatlistpat. (Christian Brabandt,
closes vim/vim#9526, closes vim/vim#9512)
https://github.com/vim/vim/commit/c53b467473160b5cfce77277fbae414bf43e66ce
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 8de86ce76e..dc9f01ff60 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -5220,6 +5220,18 @@ unsigned int get_bkc_value(buf_T *buf) return buf->b_bkc_flags ? buf->b_bkc_flags : bkc_flags; } +/// Get the local or global value of 'formatlistpat'. +/// +/// @param buf The buffer. +char *get_flp_value(buf_T *buf) +{ + return buf->b_p_flp ? buf->b_p_flp : p_flp; + if (buf->b_p_flp == NULL || *buf->b_p_flp == NUL) { + return p_flp; + } + return buf->b_p_flp; +} + /// Get the local or global value of the 'virtualedit' flags. unsigned int get_ve_flags(void) { |