From d541c7d9b16d54b32bb4b59cb164aa95eaf3cb78 Mon Sep 17 00:00:00 2001 From: Ches Martin Date: Sun, 1 May 2011 22:30:04 +0700 Subject: [PATCH] respect NERDRemoveAltComs when uncommenting multipart blocks --- plugin/NERD_commenter.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index a08f89f..a53faa4 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -1417,14 +1417,14 @@ function s:UncommentLineNormal(line) "remove the outter most left comment delim if indxLeft != -1 && (indxLeft < indxLeftAlt || indxLeftAlt == -1) let line = s:RemoveDelimiters(s:Left(), '', line) - elseif indxLeftAlt != -1 + elseif indxLeftAlt != -1 && g:NERDRemoveAltComs let line = s:RemoveDelimiters(s:Left({'alt': 1}), '', line) endif "remove the outter most right comment delim if indxRight != -1 && (indxRight < indxRightAlt || indxRightAlt == -1) let line = s:RemoveDelimiters('', s:Right(), line) - elseif indxRightAlt != -1 + elseif indxRightAlt != -1 && g:NERDRemoveAltComs let line = s:RemoveDelimiters('', s:Right({'alt': 1}), line) endif endif