mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-19 18:47:29 -07:00
Merge pull request #65 from vheon/fix-preview-commit
[PlugDiff] Change directory after wincmd to avoid side-effects on BufEnter/BufLeave
This commit is contained in:
commit
25b0fb7583
10
plug.vim
10
plug.vim
@ -1176,14 +1176,14 @@ function! s:preview_commit()
|
||||
return
|
||||
endif
|
||||
|
||||
execute 'cd '.s:esc(g:plugs[name].dir)
|
||||
execute 'pedit '.sha
|
||||
execute 'pedit' sha
|
||||
wincmd P
|
||||
setlocal filetype=git buftype=nofile nobuflisted
|
||||
execute 'silent read !git show '.sha
|
||||
normal! ggdd
|
||||
wincmd p
|
||||
execute 'cd' s:esc(g:plugs[name].dir)
|
||||
execute 'silent read !git show' sha
|
||||
cd -
|
||||
normal! gg"_dd
|
||||
wincmd p
|
||||
endfunction
|
||||
|
||||
function! s:section(flags)
|
||||
|
Loading…
Reference in New Issue
Block a user