mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-16 15:23:51 -05:00
Fix netrw gx in Fugitive buffers
This commit is contained in:
@@ -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:/
|
||||
|
||||
Reference in New Issue
Block a user