diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-12-19 23:39:33 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2023-12-20 17:44:31 +0100 |
commit | 095bd8d0f8340475319cfa13776d5ec386984859 (patch) | |
tree | c8434af0f6d0f59f88e31b926f3dd41371039c57 /src/nvim/buffer.c | |
parent | 99d1e7da28061c2559c523f76b58b8bb113475ff (diff) | |
download | rneovim-095bd8d0f8340475319cfa13776d5ec386984859.tar.gz rneovim-095bd8d0f8340475319cfa13776d5ec386984859.tar.bz2 rneovim-095bd8d0f8340475319cfa13776d5ec386984859.zip |
fix(buffer): do not filter help buffer
Problem: If a help buffer is opened without legacy syntax set (because
treesitter is enabled), Vim strips (some) markup. This means the syntax
engine fails to parse (some) syntax if treesitter highlighting is
disabled again.
Solution: Do not strip the help buffer of markup since (legacy or
treesitter) highlighting is always enabled in Nvim. Similarly, remove
redundant setting of filetype and give the function a more descriptive
name.
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 7660093fc2..c9ae4c3ed3 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -302,9 +302,9 @@ int open_buffer(bool read_stdin, exarg_T *eap, int flags_arg) } #endif - // Help buffer is filtered. + // Help buffer: populate *local-additions* in help.txt if (bt_help(curbuf)) { - fix_help_buffer(); + get_local_additions(); } } else if (read_stdin) { int save_bin = curbuf->b_p_bin; |