bugfix: remove extra spaces (if options permit) when uncommenting irregular comments

This commit is contained in:
Martin Grenfell
2008-04-28 22:07:18 +12:00
parent ebe9dc2a38
commit 75f5b5f275
2 changed files with 9 additions and 4 deletions

View File

@@ -869,6 +869,8 @@ to get illegal syntax when uncommenting them.
- added support for services and gitcommit, thx to Christophe Benz for the
email
- set the NERDRemoveExtraSpaces option to 1 by default as the doc states
- fixed a bug where extra spaces werent being removed sometimes, thx to
Zhang Shuhan for the report
2.1.12
- added support for patran and dakota, thx to Jacobo Diaz for the email
@@ -1181,6 +1183,9 @@ Thanks to Ingo Karkat for the bug reports and the bugfix patch.
Not to forget! Thanks to the following people for sending me new filetypes to
support :D
Thanks to Zhang Shuhan for noticing (and sending me the bug report) that
spaces werent being removed properly for some comments.
The hackers The filetypes~
Sam R verilog
Jonathan Derque context, plaintext and mail

View File

@@ -1911,16 +1911,16 @@ function s:UncommentLineNormal(line)
"remove the outter most left comment delim
if indxLeft != -1 && (indxLeft < indxLeftAlt || indxLeftAlt == -1)
let line = s:ReplaceLeftMostDelim(b:left, '', line)
let line = s:RemoveDelimiters(b:left, '', line)
elseif indxLeftAlt != -1
let line = s:ReplaceLeftMostDelim(b:leftAlt, '', line)
let line = s:RemoveDelimiters(b:leftAlt, '', line)
endif
"remove the outter most right comment delim
if indxRight != -1 && (indxRight < indxRightAlt || indxRightAlt == -1)
let line = s:ReplaceRightMostDelim(b:right, '', line)
let line = s:RemoveDelimiters('', b:right, line)
elseif indxRightAlt != -1
let line = s:ReplaceRightMostDelim(b:rightAlt, '', line)
let line = s:RemoveDelimiters('', b:rightAlt, line)
endif
endif