motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 394c925381ec83fccac826219ddf68fae4e1f2bb (tree)
parent 4074727343e2a906f4bc1472685f59739f8346f0
Author: Tim Pope <code@tpope.net>
Date:   Thu,  9 Jan 2020 20:27:39 -0500

Fix netrw gx in Fugitive buffers

Diffstat:
Mautoload/fugitive.vim | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim @@ -2079,6 +2079,12 @@ function! fugitive#BufReadCmd(...) abort endtry setlocal modifiable + + let browsex = maparg('<Plug>NetrwBrowseX', 'n') + if browsex =~# 'netrw#CheckIfRemote()' + exe 'nnoremap <buffer> <Plug>NetrwBrowseX' substitute(browsex, '\Cnetrw#CheckIfRemote()', '0', 'g') + endif + return 'silent ' . s:DoAutocmd('BufReadPost') . \ (modifiable ? '' : '|setl nomodifiable') catch /^fugitive:/