Guest User

Untitled

a guest
Oct 15th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. diff --git a/autoload/ref.vim b/autoload/ref.vim
  2. index a3895fc..479cd80 100644
  3. --- a/autoload/ref.vim
  4. +++ b/autoload/ref.vim
  5. @@ -335,7 +335,10 @@ function! ref#system(args, ...)
  6. endtry
  7. endif
  8.  
  9. - if s:is_win
  10. + let has_patchXXX = (v:version == 703 && has('patchXXX')) || v:version > 703
  11. + let has_patchXXX = 1 " for test
  12. +
  13. + if s:is_win && !has_patchXXX
  14. " Here is a command that want to execute.
  15. " something.bat keyword
  16. "
  17. @@ -380,7 +383,11 @@ function! ref#system(args, ...)
  18. endif
  19. let save_shellredir = &shellredir
  20. let stderr_file = tempname()
  21. - let &shellredir = '>%s 2>' . shellescape(stderr_file)
  22. + if has_patchXXX
  23. + let cmd .= ' 2>' . shellescape(stderr_file)
  24. + else
  25. + let &shellredir = '>%s 2>' . shellescape(stderr_file)
  26. + endif
  27. let stdout = ''
  28. try
  29. let stdout = a:0 ? system(cmd, a:1) : system(cmd)
Add Comment
Please, Sign In to add comment