From 308e4bf2412b2ede6efe1a19bf5b1d1a9bcdca4d Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 14 Aug 2019 01:56:17 -0400 Subject: [PATCH] Fix temp file gq shadowing blame gq --- autoload/fugitive.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index a859de9..f442c8e 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2091,7 +2091,9 @@ function! s:TempReadPost(file) abort if empty(mapcheck('q', 'n')) nnoremap q :bdeleteechohl WarningMsgecho "Temp file q is deprecated in favor of the built-in C-W>q"echohl NONE endif - call s:Map('n', 'gq', ":bdelete", '') + if !&modifiable + call s:Map('n', 'gq', ":bdelete", ' ') + endif endif return '' endfunction