bugfix: fixed a bug with aligned comments and the NERDSpaceDelims option

This commit is contained in:
marty
2007-12-14 14:15:42 +13:00
parent 443eb8045e
commit 023a62224e
2 changed files with 7 additions and 2 deletions

View File

@@ -866,6 +866,8 @@ to get illegal syntax when uncommenting them.
- added support for spectre, thx to Brett Warneke - added support for spectre, thx to Brett Warneke
- fixed a bug that was screwing up the removal of spaces when - fixed a bug that was screwing up the removal of spaces when
NERDSpaceDelims was set. Thx to David Miani for posting the issue. NERDSpaceDelims was set. Thx to David Miani for posting the issue.
- fixed a bug with aligned comments and the NERDSpaceDelims option, thx to
Jeremy Hinegardner
- added dummy support for lhaskell, thx to pipp for posting the issue - added dummy support for lhaskell, thx to pipp for posting the issue
@@ -1135,6 +1137,9 @@ Cheers to Yongwei Wu for a bug report about the passwd filetype.
Thanks to David Miani for reporting a space-removal bug when using the Thanks to David Miani for reporting a space-removal bug when using the
NERDSpaceDelims option. NERDSpaceDelims option.
Thanks to Jeremy Hinegardner for emailing me about a bug with aligned
comments and the NERDSpaceDelims option.
Not to forget! Thanks to the following people for sending me new filetypes to Not to forget! Thanks to the following people for sending me new filetypes to
support :D support :D

View File

@@ -1106,12 +1106,12 @@ function s:CommentLines(forceNested, alignLeft, alignRight, firstLine, lastLine)
" check if we can comment this line " check if we can comment this line
if !isCommented || g:NERDUsePlaceHolders || s:Multipart() if !isCommented || g:NERDUsePlaceHolders || s:Multipart()
if a:alignLeft if a:alignLeft
let theLine = s:AddLeftDelimAligned(b:left, theLine, leftAlignIndx) let theLine = s:AddLeftDelimAligned(s:GetLeft(0,1,0), theLine, leftAlignIndx)
else else
let theLine = s:AddLeftDelim(s:GetLeft(0,1,0), theLine) let theLine = s:AddLeftDelim(s:GetLeft(0,1,0), theLine)
endif endif
if a:alignRight if a:alignRight
let theLine = s:AddRightDelimAligned(b:right, theLine, rightAlignIndx) let theLine = s:AddRightDelimAligned(s:GetRight(0,1,0), theLine, rightAlignIndx)
else else
let theLine = s:AddRightDelim(s:GetRight(0,1,0), theLine) let theLine = s:AddRightDelim(s:GetRight(0,1,0), theLine)
endif endif