diff --git a/plugin/NERD_commenter.vim b/plugin/NERD_commenter.vim index 6afa6c5..e6660ce 100644 --- a/plugin/NERD_commenter.vim +++ b/plugin/NERD_commenter.vim @@ -1129,7 +1129,12 @@ function! NERDComment(mode, type) range let &ignorecase = oldIgnoreCase - silent! call repeat#set("\NERDCommenter". a:type) + if isVisual + let nlines = lastLine - firstLine + silent! call repeat#set("V" . nlines . "jo" . "\NERDCommenter". a:type) + else + silent! call repeat#set("\NERDCommenter". a:type) + endif endfunction " Function: s:PlaceDelimitersAndInsBetween() function {{{2