diff options
author | Santos Gallegos <santos_g@outlook.com> | 2020-04-08 10:57:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-08 08:57:32 -0700 |
commit | 1f56f9a4b32c7d7aebafea226c148e9ed8bbabdb (patch) | |
tree | d58e98387406d3a40f69c1e8bf2ce86545878167 | |
parent | 30a6e374d44757ee12e941fc6efe1a7726fc5ecc (diff) | |
download | rneovim-1f56f9a4b32c7d7aebafea226c148e9ed8bbabdb.tar.gz rneovim-1f56f9a4b32c7d7aebafea226c148e9ed8bbabdb.tar.bz2 rneovim-1f56f9a4b32c7d7aebafea226c148e9ed8bbabdb.zip |
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
-rw-r--r-- | runtime/autoload/netrw.vim | 5 |
1 files changed, 5 insertions, 0 deletions
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") |