mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-08 18:03:46 -05:00
make sexy commenting fall back to normal commenting if sexy comments arent possible with the current filetype
This commit is contained in:
@@ -871,6 +871,8 @@ to get illegal syntax when uncommenting them.
|
|||||||
- set the NERDRemoveExtraSpaces option to 1 by default as the doc states
|
- set the NERDRemoveExtraSpaces option to 1 by default as the doc states
|
||||||
- fixed a bug where extra spaces werent being removed sometimes, thx to
|
- fixed a bug where extra spaces werent being removed sometimes, thx to
|
||||||
Zhang Shuhan for the report
|
Zhang Shuhan for the report
|
||||||
|
- made the sexy comment mapping fall back to normal commenting if sexy
|
||||||
|
comments arent possible with the filetypes delimiters
|
||||||
- fixed some other bugs with sexy comments
|
- fixed some other bugs with sexy comments
|
||||||
|
|
||||||
2.1.12
|
2.1.12
|
||||||
|
|||||||
@@ -1516,7 +1516,7 @@ function! NERDComment(isVisual, type) range
|
|||||||
try
|
try
|
||||||
call s:CommentLinesSexy(firstLine, lastLine)
|
call s:CommentLinesSexy(firstLine, lastLine)
|
||||||
catch /NERDCommenter.Delimiters/
|
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/
|
catch /NERDCommenter.Nesting/
|
||||||
call s:NerdEcho("Sexy comment aborted. Nested sexy cannot be nested", 0)
|
call s:NerdEcho("Sexy comment aborted. Nested sexy cannot be nested", 0)
|
||||||
endtry
|
endtry
|
||||||
|
|||||||
Reference in New Issue
Block a user