Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for C/C++ alternative comments #480

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions autoload/nerdcommenter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down