mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-11-13 04:03:46 -05:00
Exposed function to check whether a line is commented
This commit is contained in:
@@ -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
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user