Commit 5d7c03a
authored
fix(statistics cookie): count only TODO headlines (#938)
Previously, the todo statistics cookie was counting all child headlines in
its calculation, regardless of whether they had TODO keywords. This fix
modifies the `update_todo_cookie` function to:
1. Filter child headlines to only those with valid TODO keywords
2. Calculate the ratio of DONE tasks to total tasks with TODO keywords
3. Update the cookie with the correct statistics
This ensures consistency with Org Mode's behavior where non-task headlines
are excluded from statistics calculations.
Co-authored-by: Sebastian Flügge <sebastian.fluegge@dnv.com>1 parent abf8890 commit 5d7c03a
File tree
2 files changed
+29
-3
lines changed- lua/orgmode/files
- tests/plenary/ui/mappings
2 files changed
+29
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
949 | | - | |
| 949 | + | |
950 | 950 | | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
951 | 956 | | |
952 | 957 | | |
953 | | - | |
| 958 | + | |
954 | 959 | | |
955 | 960 | | |
956 | | - | |
| 961 | + | |
957 | 962 | | |
958 | 963 | | |
959 | 964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
433 | 454 | | |
0 commit comments