瀏覽代碼

Merge pull request #451 from simonweil/reset-colors-for-show

Prevent escape sequences in the preview window from PlugDiff

Steps to reproduce:
1. `git config color.ui always`
2. `PlugDiff`
3. See the content of a commit with `o`
Junegunn Choi 9 年之前
父節點
當前提交
bdc5c8d3cc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plug.vim

+ 1 - 1
plug.vim

@@ -2057,7 +2057,7 @@ function! s:preview_commit()
   execute 'pedit' sha
   wincmd P
   setlocal filetype=git buftype=nofile nobuflisted modifiable
-  execute 'silent read !cd' s:shellesc(g:plugs[name].dir) '&& git show --pretty=medium' sha
+  execute 'silent read !cd' s:shellesc(g:plugs[name].dir) '&& git show --no-color --pretty=medium' sha
   normal! gg"_dd
   setlocal nomodifiable
   nnoremap <silent> <buffer> q :q<cr>