Author: Kyle Fuller <kyle@fuller.li> 2018-07-17 23:07:21 +0100 +0100
Committer: Kyle Fuller <kyle@fuller.li> 2018-07-17 23:07:21 +0100 +0100
Commit: f27b2952490aa6adc11d4406898d1e328cbefefb
Parent: f2e827a7106d5a28bb74be6ad19311223264c771
chore(vim): Update vim-plug
diff --git a/.vim/autoload/plug.vim b/.vim/autoload/plug.vim
index 143c377c7d20068ad3d31fca1004cc939ed8e494..52c6b2ad30cad173d13b358b577eeb0940ff2025 100644
--- a/.vim/autoload/plug.vim
+++ b/.vim/autoload/plug.vim
@@ -96,7 +96,7 @@ let s:plug_src = 'https://github.com/junegunn/vim-plug.git'
let s:plug_tab = get(s:, 'plug_tab', -1)
let s:plug_buf = get(s:, 'plug_buf', -1)
let s:mac_gui = has('gui_macvim') && has('gui_running')
-let s:is_win = has('win32') || has('win64')
+let s:is_win = has('win32')
let s:nvim = has('nvim-0.2') || (has('nvim') && exists('*jobwait') && !s:is_win)
let s:vim8 = has('patch-8.0.0039') && exists('*job_start')
let s:me = resolve(expand('<sfile>:p'))
@@ -799,7 +799,7 @@ " but it won't work on Windows.
let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd
if s:is_win
let batchfile = tempname().'.bat'
- call writefile(['@echo off', cmd], batchfile)
+ call writefile(["@echo off\r", cmd . "\r"], batchfile)
let cmd = batchfile
endif
let g:_plug_bang = (s:is_win && has('gui_running') ? 'silent ' : '').'!'.escape(cmd, '#!%')
@@ -908,7 +908,7 @@ if !empty(s:update.errors)
call add(msgs, "Press 'R' to retry.")
endif
if a:pull && len(s:update.new) < len(filter(getline(5, '$'),
- \ "v:val =~ '^- ' && stridx(v:val, 'Already up-to-date') < 0"))
+ \ "v:val =~ '^- ' && v:val !~# 'Already up.to.date'"))
call add(msgs, "Press 'D' to see the updated changes.")
endif
echo join(msgs, ' ')
@@ -1196,7 +1196,7 @@ \ 'new': get(a:opts, 'new', 0) }
let s:jobs[a:name] = job
let cmd = has_key(a:opts, 'dir') ? s:with_cd(a:cmd, a:opts.dir) : a:cmd
if !empty(job.batchfile)
- call writefile(['@echo off', cmd], job.batchfile)
+ call writefile(["@echo off\r", cmd . "\r"], job.batchfile)
let cmd = job.batchfile
endif
let argv = add(s:is_win ? ['cmd', '/c'] : ['sh', '-c'], cmd)
@@ -2023,7 +2023,7 @@ let [sh, shellcmdflag, shrd] = s:chsh(1)
let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd
if s:is_win
let batchfile = tempname().'.bat'
- call writefile(['@echo off', cmd], batchfile)
+ call writefile(["@echo off\r", cmd . "\r"], batchfile)
let cmd = batchfile
endif
return system(s:is_win ? '('.cmd.')' : cmd)
@@ -2357,7 +2357,7 @@ let [sh, shellcmdflag, shrd] = s:chsh(1)
let cmd = 'cd '.s:shellesc(g:plugs[name].dir).' && git show --no-color --pretty=medium '.sha
if s:is_win
let batchfile = tempname().'.bat'
- call writefile(['@echo off', cmd], batchfile)
+ call writefile(["@echo off\r", cmd . "\r"], batchfile)
let cmd = batchfile
endif
execute 'silent %!' cmd
@@ -2426,8 +2426,13 @@ call setline(1, printf('%d plugin(s) updated.', cnts[0])
\ . (cnts[1] ? printf(' %d plugin(s) have pending updates.', cnts[1]) : ''))
if cnts[0] || cnts[1]
- nnoremap <silent> <buffer> <cr> :silent! call <SID>preview_commit()<cr>
- nnoremap <silent> <buffer> o :silent! call <SID>preview_commit()<cr>
+ nnoremap <silent> <buffer> <plug>(plug-preview) :silent! call <SID>preview_commit()<cr>
+ if empty(maparg("\<cr>", 'n'))
+ nmap <buffer> <cr> <plug>(plug-preview)
+ endif
+ if empty(maparg('o', 'n'))
+ nmap <buffer> o <plug>(plug-preview)
+ endif
endif
if cnts[0]
nnoremap <silent> <buffer> X :call <SID>revert()<cr>