fix: Reference current buffer not '1' re b:NERDCommenterFirstInit (#519)

This commit is contained in:
Yuxin Wu
2023-05-08 19:58:24 +08:00
committed by GitHub
parent 1fe9e1cfea
commit 277bdfc679

View File

@@ -491,7 +491,7 @@ function! nerdcommenter#SetUp() abort
endif
endfor
" if g:NERD_<filetype>_alt_style is defined, use the alternate style
let b:NERDCommenterFirstInit = getbufvar(1,'NERDCommenterFirstInit')
let b:NERDCommenterFirstInit = getbufvar(bufnr(),'NERDCommenterFirstInit')
if exists('g:NERDAltDelims_'.filetype) && eval('g:NERDAltDelims_'.filetype) && !b:NERDCommenterFirstInit
let b:NERDCommenterFirstInit = 1
call nerdcommenter#SwitchToAlternativeDelimiters(0)