org-heatmap
org-heatmap copied to clipboard
search-forward fails in org-heatmap-habit-add-streak
Following on from #1, I found another case where this forward search fails:
https://github.com/Elilif/org-heatmap/blob/4fe432d33a3f1caa7370e5f8d4bec2efba4827d7/org-heatmap.el#L470
It's when the agenda line is long enough to get truncated. Here's the original entry:
and here's how it's rendered in the agenda:
However the above code is searching for the non-truncated version (which includes the word "running" at the end, so it fails.
This also begs the question: what if you have two different entries which look identical when truncated? Or not identical but only the last character or two are different? How could the code best be changed to reliably pick the right one?