bugfix: fixed single line compact sexy comments

This commit is contained in:
Martin Grenfell
2008-04-29 21:38:06 +12:00
parent 3aeaa92dd7
commit 06be251c66
2 changed files with 8 additions and 5 deletions

View File

@@ -875,6 +875,7 @@ to get illegal syntax when uncommenting them.
comments arent possible with the filetypes delimiters
- fixed some other bugs with sexy comments
- made toggle commenting slightly more robust
- fixed a bug with single line compact sexy comments
2.1.12
- added support for patran and dakota, thx to Jacobo Diaz for the email

View File

@@ -1284,12 +1284,14 @@ function s:CommentLinesSexy(topline, bottomline)
call setline(a:topline, theLine)
"comment the bottom line
if a:bottomline != a:topline
let theLine = getline(a:bottomline)
let lineHasTabs = s:HasLeadingTabs(theLine)
if lineHasTabs
let theLine = s:ConvertLeadingTabsToSpaces(theLine)
endif
let theLine = s:SwapOutterMultiPartDelimsForPlaceHolders(theLine)
endif
let theLine = s:AddRightDelim(spaceString . right, theLine)
if lineHasTabs
let theLine = s:ConvertLeadingSpacesToTabs(theLine)