Don't back up if no match found

This commit is contained in:
Tim Pope 2008-02-04 03:50:46 +00:00
parent 4c001173ad
commit 5f32b8921e

View File

@ -425,7 +425,9 @@ function! s:dosurround(...) " {{{1
else
exe 'norm d'.strcount.'i'.char
" One character backwards
call search('.','bW')
if getreg('"') != ""
call search('.','bW')
endif
endif
let keeper = getreg('"')
let okeeper = keeper " for reindent below