From 91499c76a7358b10945c50173fa8c64dc3c909c8 Mon Sep 17 00:00:00 2001 From: Yuxin Wu Date: Thu, 20 Apr 2023 23:44:44 -0700 Subject: [PATCH] Prevent caching of buffer commentstring (#515) Co-authored-by: Yuxin Wu --- autoload/nerdcommenter.vim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autoload/nerdcommenter.vim b/autoload/nerdcommenter.vim index a088e60..2992ed2 100644 --- a/autoload/nerdcommenter.vim +++ b/autoload/nerdcommenter.vim @@ -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__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()