Make commit preview unmodifiable + map q for quit

This commit is contained in:
Andrew Haust 2015-07-07 14:53:38 -04:00
parent 23b508e5fd
commit 6286337e5b

View file

@ -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