Skip to content

Commit

Permalink
Fix bug when closing delimiter is at line end (tpope#284) (tpope#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
agguser authored and tpope committed Nov 28, 2019
1 parent e4c4cc0 commit f51a26d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/surround.vim
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ function! s:dosurround(...) " {{{1
let keeper = substitute(keeper,'^\s\+','','')
let keeper = substitute(keeper,'\s\+$','','')
endif
if col("']") == col("$") && col('.') + 1 == col('$')
if col("']") == col("$") && virtcol('.') + 1 == virtcol('$')
if oldhead =~# '^\s*$' && a:0 < 2
let keeper = substitute(keeper,'\%^\n'.oldhead.'\(\s*.\{-\}\)\n\s*\%$','\1','')
endif
Expand Down

0 comments on commit f51a26d

Please sign in to comment.