From 85020495ef4557079c99c477e08ab0e4c87215be Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Wed, 11 Oct 2017 00:32:17 +0200 Subject: [PATCH] Only use the tagstack if the file actually exists This caused problems when using jedi-vim without an actual file behind a buffer. --- pythonx/jedi_vim.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonx/jedi_vim.py b/pythonx/jedi_vim.py index 1f4b0b0..63f821b 100644 --- a/pythonx/jedi_vim.py +++ b/pythonx/jedi_vim.py @@ -270,7 +270,7 @@ def goto(mode="goto", no_output=False): using_tagstack=using_tagstack) if not result: return [] - if d.module_path and using_tagstack: + if d.module_path and os.path.exists(d.module_path) and using_tagstack: tagname = d.name with tempfile('{0}\t{1}\t{2}'.format(tagname, d.module_path, 'call cursor({0}, {1})'.format(d.line, d.column + 1))) as f: