From 9f23ec01d555cbec7ab292dde250fe5b6f29c671 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Mon, 29 Dec 2014 10:34:44 +0100 Subject: [PATCH] VimwikiTask: Do not refresh task when saving It is not necessary, since task's UUID is refreshed upon saving by tasklib. --- autoload/vimwiki_pytasks.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/autoload/vimwiki_pytasks.py b/autoload/vimwiki_pytasks.py index 1cc6b8f..ba0158d 100644 --- a/autoload/vimwiki_pytasks.py +++ b/autoload/vimwiki_pytasks.py @@ -132,13 +132,8 @@ class VimwikiTask(object): self.task.save() # Load the UUID - self.task.refresh() - self.uuid = self.task['uuid'] - vim.command('echom "uuid: %s"' % self.uuid) - - # Make parent task dependant on this task - if self.parent: - self.parent['depends'] = self.task['uuid'] + if not self.uuid: + self.uuid = self.task['uuid'] # Mark task as done. This works fine with already completed tasks. if self.completed: