respect NERDRemoveAltComs when uncommenting multipart blocks

This commit is contained in:
Ches Martin 2011-05-01 22:30:04 +07:00
parent f98f73221c
commit d541c7d9b1

View File

@ -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