Prevent caching of buffer commentstring (#515)

Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
This commit is contained in:
Yuxin Wu
2023-04-20 23:44:44 -07:00
committed by GitHub
parent bd1a29536d
commit 91499c76a7

View File

@@ -461,10 +461,6 @@ endif
" This function is responsible for setting up buffer scoped variables for the
" current buffer.
function! nerdcommenter#SetUp() abort
if exists('b:NERDCommenterDelims')
return
endif
let filetype = &filetype
"for compound filetypes, if we don't know how to handle the full filetype
@@ -496,8 +492,8 @@ function! nerdcommenter#SetUp() abort
" if g:NERD_<filetype>_alt_style is defined, use the alternate style
let b:NERDCommenterFirstInit = getbufvar(1,'NERDCommenterFirstInit')
if exists('g:NERDAltDelims_'.filetype) && eval('g:NERDAltDelims_'.filetype) && !b:NERDCommenterFirstInit
call nerdcommenter#SwitchToAlternativeDelimiters(0)
let b:NERDCommenterFirstInit = 1
call nerdcommenter#SwitchToAlternativeDelimiters(0)
endif
else
let b:NERDCommenterDelims = s:CreateDelimMapFromCms()