From 839012de283c8be86021ce37a9db8bb1068303ba Mon Sep 17 00:00:00 2001 From: gryf Date: Wed, 25 May 2016 08:32:54 +0200 Subject: [PATCH] Fixed bug regarding deleting not existed tags cache. --- ftplugin/python/pythonhelper.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ftplugin/python/pythonhelper.py b/ftplugin/python/pythonhelper.py index 8131ece..3a7508a 100644 --- a/ftplugin/python/pythonhelper.py +++ b/ftplugin/python/pythonhelper.py @@ -197,7 +197,11 @@ class PythonHelper(object): @classmethod def delete_tags(cls, buffer_number): """Removes tag data for the specified buffer number.""" - del PythonHelper.TAGS[buffer_number] + try: + del PythonHelper.TAGS[buffer_number] + except KeyError: + # If we don't have tags for specified buffer, just pass + pass def update_vim_vars(tag):