blindFS / vim-taskwarrior

vim interface for taskwarrior
Other
518 stars 42 forks source link

Error on custom report #116

Closed ravl1084 closed 9 years ago

ravl1084 commented 9 years ago

I'm using taskwarrior 2.2.0 and I have a custom report called actions that produces this output

ID Project      Pri Description
77 home         L   Make CD Rack

When I open vim and then do :TW I get this error:

Error detected while processing function taskwarrior#log#history..taskwarrior#list:
Line 52:
E684: list index out of range: 0
E116: Invalid arguments for function index(split(getline(1), ' '), b:task_report_labels[v:key]) != -1

After hitting enter to dismiss this message, my custom report appears, but if I move the cursor left and right, it moves based on the position of the columns on the previous view instead of the current one. Also, the per-column highlighting is showing per the previous view (i.e. a part of the Description column is highlighted where the due date of the previous view was)

blindFS commented 9 years ago

Would you please provide the actions part of your taskrc?

ravl1084 commented 9 years ago

Here it is:

report.actions.description=Actionable items
report.actions.columns=id,project,due,priority,description
report.actions.sort=due+,priority-,depends+,project+
report.actions.filter=+actions and status:pending and -BLOCKED
blindFS commented 9 years ago

Well, you have to add report.actions.labels=xx,xx,xx,xx,xx to your taskrc, and let g:task_report_command = ['actions'] to your vimrc.

ravl1084 commented 9 years ago

Thank you! The labels did it.