Navigation Menu

Skip to content

Commit

Permalink
Fix commenting blank lines
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Aug 22, 2011
1 parent 0440785 commit af19af8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/commentary.vim
Expand Up @@ -30,7 +30,7 @@ function! s:go(type)
if uncomment if uncomment
let line = substitute(getline(lnum),'\S.*\s\@<!','\=submatch(0)[strlen(before):-strlen(after)-1]','') let line = substitute(getline(lnum),'\S.*\s\@<!','\=submatch(0)[strlen(before):-strlen(after)-1]','')
else 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 endif
call setline(lnum,line) call setline(lnum,line)
endfor endfor
Expand Down

0 comments on commit af19af8

Please sign in to comment.