When rangesOfProjects or rangesOfContexts compute the location for
highlighting projects or contexts within a task description, they
always used the task 'text' attribute. However, when a task was
completed there is additional text prepended in the displayed text.
This caused the highlighting to be displayed in the wrong place.
This patch changes the range computation to use the actual displayed
text instead of the 'text' attribute.
When rangesOfProjects or rangesOfContexts compute the location for highlighting projects or contexts within a task description, they always used the task 'text' attribute. However, when a task was completed there is additional text prepended in the displayed text. This caused the highlighting to be displayed in the wrong place.
This patch changes the range computation to use the actual displayed text instead of the 'text' attribute.