branch: externals-release/org commit 6a2c48704bec894eea79052d5cae07fee3779c4c Author: Ihor Radchenko <yanta...@gmail.com> Commit: Bastien <b...@gnu.org>
Avoid infinite loop in org-agenda-dim-blocked-tasks * lisp/org-agenda.el (org-agenda-dim-blocked-tasks): When the blocked task is the last line in agenda buffer and no trailing newline is present, (move-beginning-of-line 2) would not move the point causing infinite loop. Now, such case is handled correctly. --- lisp/org-agenda.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b6cd895..b196e14 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4042,7 +4042,9 @@ dimming them." (overlay-put ov 'face 'org-agenda-dimmed-todo-face)) (when invisible (org-agenda-filter-hide-line 'todo-blocked))) - (move-beginning-of-line 2)))) + (if (= (point-max) (line-end-position)) + (goto-char (point-max)) + (move-beginning-of-line 2))))) (when (called-interactively-p 'interactive) (message "Dim or hide blocked tasks...done")))