org-update-parent-todo-statistics: Fix infinite loop after 4254a54f8

* lisp/org.el (org-update-parent-todo-statistics): Make sure that we
move to the end of updated cookie at the end of search loop, even when
the cookie has not been updated.

Reported-by: No Wayman <iarchivedmywholelife@gmail.com>
Link: https://orgmode.org/list/87le6pucnv.fsf@gmail.com
This commit is contained in:
Ihor Radchenko 2024-03-13 13:26:00 +03:00
parent e2caccfdf6
commit 505db97a8c
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 0 deletions

View File

@ -9905,6 +9905,7 @@ statistics everywhere."
(max 1 cnt-all)))
(format "[%d/%d]" cnt-done cnt-all))
ndel (- (match-end 0) checkbox-beg))
(goto-char (match-end 0))
(unless (string-equal new (buffer-substring checkbox-beg (match-end 0)))
(goto-char checkbox-beg)
(insert new)