Work around Vim parser idiosyncrasy

This commit is contained in:
Tim Pope 2011-01-04 15:04:47 -05:00
parent 882597d17e
commit 9bbea8a2a1

View File

@ -1129,7 +1129,9 @@ function! s:Move(force,destination)
endif endif
endif endif
if isdirectory(s:buffer().name()) if isdirectory(s:buffer().name())
call s:buffer().setvar('&swapfile',0) " Work around Vim parser idiosyncrasy
let b = s:buffer()
call b.setvar('&swapfile',0)
endif endif
let message = call(s:repo().git_chomp_in_tree,['mv']+(a:force ? ['-f'] : [])+['--', s:buffer().path(), destination], s:repo()) let message = call(s:repo().git_chomp_in_tree,['mv']+(a:force ? ['-f'] : [])+['--', s:buffer().path(), destination], s:repo())
if v:shell_error if v:shell_error