Skip to content

Commit

Permalink
Fix nesting of closing comment on separate line
Browse files Browse the repository at this point in the history
Resolves: #119
  • Loading branch information
tpope committed Oct 31, 2022
1 parent 3654775 commit e87cd90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/commentary.vim
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function! s:strip_white_space(l,r,line) abort
if l[-1:] ==# ' ' && stridx(a:line,l) == -1 && stridx(a:line,l[0:-2]) == 0
let l = l[:-2]
endif
if r[0] ==# ' ' && a:line[-strlen(r):] != r && a:line[1-strlen(r):] == r[1:]
if r[0] ==# ' ' && (' ' . a:line)[-strlen(r)-1:] != r && a:line[-strlen(r):] == r[1:]
let r = r[1:]
endif
return [l, r]
Expand Down

0 comments on commit e87cd90

Please sign in to comment.