fix repeat for visual-line comments

this is still broken for visual and visual-block commenting
This commit is contained in:
Martin Grenfell 2012-03-12 10:24:38 +00:00
parent 20e089f6b9
commit 93cdbafd7f

View File

@ -1129,7 +1129,12 @@ function! NERDComment(mode, type) range
let &ignorecase = oldIgnoreCase
silent! call repeat#set("\<Plug>NERDCommenter". a:type)
if isVisual
let nlines = lastLine - firstLine
silent! call repeat#set("V" . nlines . "jo" . "\<Plug>NERDCommenter". a:type)
else
silent! call repeat#set("\<Plug>NERDCommenter". a:type)
endif
endfunction
" Function: s:PlaceDelimitersAndInsBetween() function {{{2