Permalink
Browse files

Fix commenting blank lines

  • Loading branch information...
1 parent 0440785 commit af19af8dc00249eb4bade7c9c561adfe8819fdd0 @tpope committed Aug 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 plugin/commentary.vim
View
@@ -30,7 +30,7 @@ function! s:go(type)
if uncomment
let line = substitute(getline(lnum),'\S.*\s\@<!','\=submatch(0)[strlen(before):-strlen(after)-1]','')
else
- let line = substitute(getline(lnum),'^\%('.matchstr(getline(lnum1),'^\s*').'\|\s*\)\zs.*\s\@<!','\=before.submatch(0).after','')
+ let line = substitute(getline(lnum),'^\%('.matchstr(getline(lnum1),'^\s*').'\|\s*\)\zs.*\S\@<=','\=before.submatch(0).after','')
endif
call setline(lnum,line)
endfor

0 comments on commit af19af8

Please sign in to comment.