Exposed function to check whether a line is commented

This commit is contained in:
svermeulen
2013-05-25 15:31:00 -03:00
parent 0b3d928dce
commit fbe3bd3c35

View File

@@ -1035,6 +1035,11 @@ function s:InvertComment(firstLine, lastLine)
endwhile
endfunction
function! NERDCommentIsLineCommented(lineNo)
let theLine = getline(a:lineNo)
return s:IsInSexyComment(a:lineNo) || s:IsCommentedFromStartOfLine(s:Left(), theLine) || s:IsCommentedFromStartOfLine(s:Left({'alt': 1}), theLine)
endfunction
" Function: NERDComment(mode, type) function {{{2
" This function is a Wrapper for the main commenting functions
"