mirror of
https://github.com/tbabej/taskwiki.git
synced 2025-08-23 02:23:07 +02:00
update_from_tw: Use cache and GENERIC_TASK regexp
This commit is contained in:
parent
bbf6aa390a
commit
c28a468e1f
1 changed files with 4 additions and 5 deletions
|
@ -184,12 +184,11 @@ def update_from_tw():
|
|||
for i in range(len(vim.current.buffer)):
|
||||
line = vim.current.buffer[i]
|
||||
|
||||
if re.search(TASKS_TO_SAVE_TO_TW, line):
|
||||
task = VimwikiTask(line, i)
|
||||
task.save_to_tw()
|
||||
line = str(task)
|
||||
if re.search(GENERIC_TASK, line):
|
||||
task = cache[i]
|
||||
task.update_from_tw()
|
||||
task.update_in_buffer()
|
||||
|
||||
vim.current.buffer[i] = line
|
||||
|
||||
number_of_lines = len(vim.current.buffer)
|
||||
vim.command('echom "lines: %d"' % number_of_lines)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue