mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-02-24 09:59:40 +08:00
respect NERDRemoveAltComs when uncommenting multipart blocks
This commit is contained in:
parent
f98f73221c
commit
d541c7d9b1
@ -1417,14 +1417,14 @@ function s:UncommentLineNormal(line)
|
|||||||
"remove the outter most left comment delim
|
"remove the outter most left comment delim
|
||||||
if indxLeft != -1 && (indxLeft < indxLeftAlt || indxLeftAlt == -1)
|
if indxLeft != -1 && (indxLeft < indxLeftAlt || indxLeftAlt == -1)
|
||||||
let line = s:RemoveDelimiters(s:Left(), '', line)
|
let line = s:RemoveDelimiters(s:Left(), '', line)
|
||||||
elseif indxLeftAlt != -1
|
elseif indxLeftAlt != -1 && g:NERDRemoveAltComs
|
||||||
let line = s:RemoveDelimiters(s:Left({'alt': 1}), '', line)
|
let line = s:RemoveDelimiters(s:Left({'alt': 1}), '', line)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"remove the outter most right comment delim
|
"remove the outter most right comment delim
|
||||||
if indxRight != -1 && (indxRight < indxRightAlt || indxRightAlt == -1)
|
if indxRight != -1 && (indxRight < indxRightAlt || indxRightAlt == -1)
|
||||||
let line = s:RemoveDelimiters('', s:Right(), line)
|
let line = s:RemoveDelimiters('', s:Right(), line)
|
||||||
elseif indxRightAlt != -1
|
elseif indxRightAlt != -1 && g:NERDRemoveAltComs
|
||||||
let line = s:RemoveDelimiters('', s:Right({'alt': 1}), line)
|
let line = s:RemoveDelimiters('', s:Right({'alt': 1}), line)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user