make sexy commenting fall back to normal commenting if sexy comments arent possible with the current filetype

This commit is contained in:
Martin Grenfell
2008-04-28 22:54:37 +12:00
parent 0256b0a18c
commit 4809a9c287
2 changed files with 3 additions and 1 deletions

View File

@@ -1516,7 +1516,7 @@ function! NERDComment(isVisual, type) range
try
call s:CommentLinesSexy(firstLine, lastLine)
catch /NERDCommenter.Delimiters/
call s:NerdEcho("Sexy comments cannot be done with the available delimiters", 0)
call s:CommentLines(forceNested, 0, 0, firstLine, lastLine)
catch /NERDCommenter.Nesting/
call s:NerdEcho("Sexy comment aborted. Nested sexy cannot be nested", 0)
endtry