Permalink
Browse files

Fix issue #18

  • Loading branch information...
chrisbra committed Dec 28, 2012
1 parent 8bf4479 commit b91edf2d549c0fe6467be07b1bc999aa67422129
Showing with 6 additions and 1 deletion.
  1. +6 −1 autoload/recover.vim
View
@@ -114,7 +114,8 @@ fu! recover#ConfirmSwapDiff() "{{{1
if executable('vim')
" Capture E325 Warning message
" Leave English output, so parsing will be easier
- let msg = system('TERM=vt100 LC_ALL=C vim -u NONE -U NONE -es -V '.bufname)
+ let cmd = printf("%s vim -u NONE -U NONE -es -V %s", (s:isWin() ? '' : 'TERM=vt100 LC_ALL=C'), bufname)
+ let msg = system(cmd)
let msg = substitute(msg, '.*\(E325.*process ID:.\{-}\)\%x0d.*', '\1', '')
let msg = substitute(msg, "\e\\[\\d\\+C", "", "g")
endif
@@ -306,6 +307,10 @@ fu! s:SetSwapfile() "{{{1
sil setl noswapfile swapfile
endif
endfu
+
+fu! s:isWin() "{{{1
+ return has("win32") || has("win16") || has("win64")
+endfu
fu! recover#BalloonExprRecover() "{{{1
" Set up a balloon expr.
if exists("b:swapbufnr") && v:beval_bufnr!=?b:swapbufnr

0 comments on commit b91edf2

Please sign in to comment.