emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org 6a2c487 07/22: Avoid infinite loop in org-a


From: ELPA Syncer
Subject: [elpa] externals-release/org 6a2c487 07/22: Avoid infinite loop in org-agenda-dim-blocked-tasks
Date: Mon, 27 Sep 2021 15:57:33 -0400 (EDT)

branch: externals-release/org
commit 6a2c48704bec894eea79052d5cae07fee3779c4c
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Bastien <bzg@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")))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]