mirror of
https://github.com/akelge/zsh
synced 2025-07-04 21:49:05 +00:00
Added vim-flake8 (pyflakes+pep8+mccabe)
Updated vcs plugin
This commit is contained in:
@ -378,31 +378,21 @@ endfunction
|
||||
" command line on Windows systems.
|
||||
|
||||
function! s:VCSCommandUtility.system(...)
|
||||
if (has("win32") || has("win64")) && &sxq !~ '"'
|
||||
let save_sxq = &sxq
|
||||
set sxq=\"
|
||||
endif
|
||||
try
|
||||
let output = call('system', a:000)
|
||||
if exists('*iconv') && has('multi_byte')
|
||||
if(strlen(&tenc) && &tenc != &enc)
|
||||
let output = iconv(output, &tenc, &enc)
|
||||
else
|
||||
let originalBuffer = VCSCommandGetOriginalBuffer(VCSCommandGetOption('VCSCommandEncodeAsFile', 0))
|
||||
if originalBuffer
|
||||
let fenc = getbufvar(originalBuffer, '&fenc')
|
||||
if fenc != &enc
|
||||
let output = iconv(output, fenc, &enc)
|
||||
endif
|
||||
let output = call('system', a:000)
|
||||
if exists('*iconv') && has('multi_byte')
|
||||
if(strlen(&tenc) && &tenc != &enc)
|
||||
let output = iconv(output, &tenc, &enc)
|
||||
else
|
||||
let originalBuffer = VCSCommandGetOriginalBuffer(VCSCommandGetOption('VCSCommandEncodeAsFile', 0))
|
||||
if originalBuffer
|
||||
let fenc = getbufvar(originalBuffer, '&fenc')
|
||||
if fenc != &enc
|
||||
let output = iconv(output, fenc, &enc)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
finally
|
||||
if exists("save_sxq")
|
||||
let &sxq = save_sxq
|
||||
endif
|
||||
endtry
|
||||
endif
|
||||
return output
|
||||
endfunction
|
||||
|
||||
@ -1033,8 +1023,7 @@ function! s:VCSVimDiff(...)
|
||||
let b:VCSCommandCommand = 'vimdiff'
|
||||
diffthis
|
||||
let t:vcsCommandVimDiffScratchList = [resultBuffer]
|
||||
" If no split method is defined, cheat, and set it to vertical.
|
||||
call s:VCSCommandUtility.pushContext({'VCSCommandSplit': orientation})
|
||||
call s:VCSCommandUtility.pushContext({'VCSCommandEdit': 'split', 'VCSCommandSplit': orientation})
|
||||
try
|
||||
let resultBuffer = s:VCSReview(a:2)
|
||||
finally
|
||||
@ -1048,7 +1037,6 @@ function! s:VCSVimDiff(...)
|
||||
diffthis
|
||||
let t:vcsCommandVimDiffScratchList += [resultBuffer]
|
||||
else
|
||||
" Add new buffer. Force splitting behavior, otherwise why use vimdiff?
|
||||
call s:VCSCommandUtility.pushContext({'VCSCommandEdit': 'split', 'VCSCommandSplit': orientation})
|
||||
try
|
||||
if(a:0 == 0)
|
||||
|
Reference in New Issue
Block a user