Skip to content
Browse files

Fix edge cases with with bare comment lines

Closes #48

Closes #66
  • Loading branch information...
1 parent 4dcfc31 commit 73e0d9a9d1f51b6cc9dc965f62669194ae851cb1 @tpope committed Mar 10, 2016
Showing with 2 additions and 2 deletions.
  1. +2 −2 plugin/commentary.vim
View
4 plugin/commentary.vim
@@ -28,11 +28,11 @@ function! s:go(type,...) abort
let [lnum1, lnum2] = [line("'["), line("']")]
endif
- let [l, r] = s:surroundings()
+ let [l_, r_] = s:surroundings()
let uncomment = 2
for lnum in range(lnum1,lnum2)
let line = matchstr(getline(lnum),'\S.*\s\@<!')
- let [l, r] = s:strip_white_space(l,r,line)
+ let [l, r] = s:strip_white_space(l_,r_,line)
if line != '' && (stridx(line,l) || line[strlen(line)-strlen(r) : -1] != r)
let uncomment = 0
endif

0 comments on commit 73e0d9a

Please sign in to comment.
Something went wrong with that request. Please try again.