mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-14 04:33:47 -05:00
Use state variable to determine whether the alternate delimiters have already been switched
This commit is contained in:
@@ -463,8 +463,10 @@ function s:SetUpForNewFiletype(filetype, forceReset)
|
|||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
" if g:NERD_<filetype>_alt_style is defined, use the alternate style
|
" if g:NERD_<filetype>_alt_style is defined, use the alternate style
|
||||||
if exists('g:NERD_'.ft.'_alt_style') && eval('g:NERD_'.ft.'_alt_style')
|
let b:NERDCommenterFirstInit = getbufvar(1,"NERDCommenterFirstInit",0)
|
||||||
|
if exists('g:NERD_'.ft.'_alt_style') && eval('g:NERD_'.ft.'_alt_style') && !b:NERDCommenterFirstInit
|
||||||
call s:SwitchToAlternativeDelimiters(0)
|
call s:SwitchToAlternativeDelimiters(0)
|
||||||
|
let b:NERDCommenterFirstInit = 1
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let b:NERDCommenterDelims = s:CreateDelimMapFromCms()
|
let b:NERDCommenterDelims = s:CreateDelimMapFromCms()
|
||||||
|
|||||||
Reference in New Issue
Block a user