Index: main/org-autofocus.el
===================================================================
--- main/org-autofocus.el	(revision main,2)
+++ main/org-autofocus.el	(revision main,3)
@@ -23,11 +23,13 @@
 (defclass org-af--task ()
   ((org :initarg :org)
-   (marked :initform nil)))
+   (marked :initform nil)
+   (passed :initform nil)))
 
 
 (defun org-af--pp (obj)
   "Print the task OBJ in the current buffer at point."
-  (with-slots (org marked) obj
-    (insert (if marked "*" " ") " " org)))
+  (with-slots (org marked passed) obj
+    (unless passed
+      (insert (if marked "*" " ") " " org "\n"))))
 
 
@@ -43,5 +45,5 @@
 	(setq tasks (nconc (org-agenda-get-day-entries f date :todo) tasks))))
 
-    (setq org-af--ewoc (ewoc-create 'org-af--pp "header" "footer"))
+    (setq org-af--ewoc (ewoc-create 'org-af--pp "header\n" "footer\n" t))
     (dolist (task tasks)
       (ewoc-enter-last org-af--ewoc (make-instance 'org-af--task :org task)))))
@@ -52,8 +54,17 @@
   (interactive)
   (let* ((node (ewoc-locate org-af--ewoc))
-         (obj (ewoc-data node)))
-    (with-slots (marked) obj
-      (setf marked (not marked))
-      (ewoc-invalidate org-af--ewoc node))))
+         (obj (ewoc-data node))
+         changed)
+    (let ((marked (not (slot-value obj 'marked))))
+      (setf (slot-value obj 'marked) marked)
+      (push node changed)
+      (let ((node node))
+        (while (and (setq node (ewoc-prev org-af--ewoc node))
+                    (setq obj (ewoc-data node))
+                    (not (slot-value obj 'marked)))
+          (setf (slot-value obj 'passed) marked)
+          (push node changed))))
+    (apply 'ewoc-invalidate org-af--ewoc changed)
+    (ewoc-goto-node org-af--ewoc node)))
 
 
