netrw.vim: gx should ignore terminal buffers #12091

netrw thinks it's a remote file due the name of a terminal buffer (term://),
but a terminal buffer isn't a file.

Fixes https://github.com/neovim/neovim/issues/4612#issuecomment-600321171
This commit is contained in:
Santos Gallegos
2020-04-08 10:57:32 -05:00
committed by GitHub
parent 30a6e374d4
commit 1f56f9a4b3

View File

@@ -5460,6 +5460,11 @@ fun! netrw#CheckIfRemote(...)
else
let curfile= expand("%")
endif
" Ignore terminal buffers
if &buftype ==# 'terminal'
return 0
endif
" call Decho("curfile<".curfile.">")
if curfile =~ '^\a\{3,}://'
" call Dret("netrw#CheckIfRemote 1")