From 04ba9a2430df874dcd581e5c792531a3dca59e06 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 25 Dec 2020 17:44:22 +0100 Subject: [PATCH] A small fix --- pythonx/jedi_vim.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pythonx/jedi_vim.py b/pythonx/jedi_vim.py index 2904927..3685c9c 100644 --- a/pythonx/jedi_vim.py +++ b/pythonx/jedi_vim.py @@ -297,6 +297,9 @@ def get_script(source=None): if source is None: source = '\n'.join(vim.current.buffer) buf_path = vim.current.buffer.name + if not buf_path: + # If a buffer has no name its name is an empty string. + buf_path = None return jedi.Script(source, path=buf_path, project=get_project())