Work around Vim parser idiosyncrasy

This commit is contained in:
Tim Pope
2011-04-25 15:14:32 -04:00
parent b11669a2eb
commit 081832380c

View File

@@ -609,7 +609,8 @@ function! s:StageToggle(lnum1,lnum2) abort
endif endif
return '' return ''
elseif line ==# '# Untracked files:' elseif line ==# '# Untracked files:'
call s:repo().git_chomp_in_tree('add','-N','.') " Work around Vim parser idiosyncrasy
let discarded = s:repo().git_chomp_in_tree('add','-N','.')
silent! edit! silent! edit!
1 1
if !search('^# Change\%(d but not updated\|s not staged for commit\):$','W') if !search('^# Change\%(d but not updated\|s not staged for commit\):$','W')
@@ -1188,8 +1189,7 @@ function! s:Move(force,destination)
endif endif
if isdirectory(s:buffer().name()) if isdirectory(s:buffer().name())
" Work around Vim parser idiosyncrasy " Work around Vim parser idiosyncrasy
let b = s:buffer() let discarded = s:buffer().setvar('&swapfile',0)
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