From c7c99edfb7762e2c5c6e5059ecbacdaed03d4e60 Mon Sep 17 00:00:00 2001 From: Cristiano De Michele Date: Wed, 10 Nov 2021 18:19:33 +0100 Subject: [PATCH] fix for C/C++ alternative comments --- autoload/nerdcommenter.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/nerdcommenter.vim b/autoload/nerdcommenter.vim index ac7c7cb..c005fa8 100644 --- a/autoload/nerdcommenter.vim +++ b/autoload/nerdcommenter.vim @@ -651,7 +651,7 @@ function! s:CommentBlock(top, bottom, lSide, rSide, forceNested) abort "alternative delimiters (if THEY are) as the comment will be better and more "accurate with multipart delimiters let switchedDelims = 0 - if !s:Multipart() && g:NERDAllowAnyVisualDelims && s:AltMultipart() + if !s:Multipart() && !g:NERDAllowAnyVisualDelims && s:AltMultipart() let switchedDelims = 1 call nerdcommenter#SwitchToAlternativeDelimiters(0) endif @@ -1068,7 +1068,7 @@ function! s:CommentRegion(topLine, topCol, bottomLine, bottomCol, forceNested) a "switch delimiters (if we can) if the current set isn't multipart let switchedDelims = 0 - if !s:Multipart() && s:AltMultipart() && g:NERDAllowAnyVisualDelims + if !s:Multipart() && s:AltMultipart() && !g:NERDAllowAnyVisualDelims let switchedDelims = 1 call nerdcommenter#SwitchToAlternativeDelimiters(0) endif