mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-13 20:23:47 -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
|
" This function is responsible for setting up buffer scoped variables for the
|
||||||
" current buffer.
|
" current buffer.
|
||||||
function! nerdcommenter#SetUp() abort
|
function! nerdcommenter#SetUp() abort
|
||||||
if exists('b:NERDCommenterDelims')
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
let filetype = &filetype
|
let filetype = &filetype
|
||||||
|
|
||||||
"for compound filetypes, if we don't know how to handle the full 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
|
" if g:NERD_<filetype>_alt_style is defined, use the alternate style
|
||||||
let b:NERDCommenterFirstInit = getbufvar(1,'NERDCommenterFirstInit')
|
let b:NERDCommenterFirstInit = getbufvar(1,'NERDCommenterFirstInit')
|
||||||
if exists('g:NERDAltDelims_'.filetype) && eval('g:NERDAltDelims_'.filetype) && !b:NERDCommenterFirstInit
|
if exists('g:NERDAltDelims_'.filetype) && eval('g:NERDAltDelims_'.filetype) && !b:NERDCommenterFirstInit
|
||||||
call nerdcommenter#SwitchToAlternativeDelimiters(0)
|
|
||||||
let b:NERDCommenterFirstInit = 1
|
let b:NERDCommenterFirstInit = 1
|
||||||
|
call nerdcommenter#SwitchToAlternativeDelimiters(0)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let b:NERDCommenterDelims = s:CreateDelimMapFromCms()
|
let b:NERDCommenterDelims = s:CreateDelimMapFromCms()
|
||||||
|
|||||||
Reference in New Issue
Block a user