Pārlūkot izejas kodu

org-agenda.el: Speedup redisplay of an agenda item after it has been modified

* org-agenda.el (org-agenda-change-all-lines): Speedup
refresh of a single line of agenda by narrowing the agenda
buffer to just that line before calling `org-agenda-finalize'.
Max Mikhanosha 12 gadi atpakaļ
vecāks
revīzija
0be5a4e0ff
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5 3
      lisp/org-agenda.el

+ 5 - 3
lisp/org-agenda.el

@@ -8033,9 +8033,11 @@ If FORCE-TAGS is non nil, the car of it returns the new tags."
 			 undone-face done-face))))
 	    (org-agenda-highlight-todo 'line)
 	    (beginning-of-line 1))
-	   (t (error "Line update did not work"))))
-	(beginning-of-line 0)))
-    (org-agenda-finalize)))
+	   (t (error "Line update did not work")))
+	  (save-restriction
+	    (narrow-to-region (point-at-bol) (point-at-eol))
+	    (org-agenda-finalize)))
+	(beginning-of-line 0)))))
 
 (defun org-agenda-align-tags (&optional line)
   "Align all tags in agenda items to `org-agenda-tags-column'."