mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-13 04:03:46 -05:00
Prevent caching of buffer commentstring (#515)
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user