From 1f56f9a4b32c7d7aebafea226c148e9ed8bbabdb Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 8 Apr 2020 10:57:32 -0500 Subject: 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 --- runtime/autoload/netrw.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime') diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim index fa86223d53..b69ad7187a 100644 --- a/runtime/autoload/netrw.vim +++ b/runtime/autoload/netrw.vim @@ -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") -- cgit