diff --git a/doc/NERD_commenter.txt b/doc/NERD_commenter.txt index b46f1e7..289eb52 100644 --- a/doc/NERD_commenter.txt +++ b/doc/NERD_commenter.txt @@ -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 diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 904de48..666606b 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -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