mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-19 06:43:06 +02:00
VimwikiTask: Use bulk update of data dict when loading from TW
This commit is contained in:
parent
6b4b6c7e09
commit
21d1de89e2
1 changed files with 7 additions and 5 deletions
|
@ -173,11 +173,13 @@ class VimwikiTask(object):
|
|||
if not self.task.saved:
|
||||
return
|
||||
|
||||
self.text = self.task['description']
|
||||
self.priority = self.priority_from_tw_format
|
||||
self.completed = (self.task['status'] == u'completed')
|
||||
self.due = self.task['due']
|
||||
self.project = self.task['project']
|
||||
self.data.update({
|
||||
'description': self.task['description']
|
||||
'priority': self.priority_from_tw_format
|
||||
'completed': (self.task['status'] == u'completed')
|
||||
'due': self.task['due']
|
||||
'project': self.task['project']
|
||||
})
|
||||
|
||||
def update_in_buffer(self):
|
||||
vim.current.buffer[self.line_number] = str(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue