Prechádzať zdrojové kódy

Merge pull request #255 from sodapopcan/plug-diff-mappings

Make commit preview unmodifiable + map q for quit
Junegunn Choi 10 rokov pred
rodič
commit
51cf219213
1 zmenil súbory, kde vykonal 2 pridanie a 0 odobranie
  1. 2 0
      plug.vim

+ 2 - 0
plug.vim

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