瀏覽代碼

org-agenda.el: Fix `org-agenda-show-new-time'

* lisp/org-agenda.el (org-agenda-show-new-time): Fix infinite
loop while trying to show new time in hidden lines.

Thanks to Andrew Hyatt for reporting this.
Bastien 5 年之前
父節點
當前提交
19676dce75
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lisp/org-agenda.el

+ 4 - 2
lisp/org-agenda.el

@@ -9571,7 +9571,9 @@ Called with a universal prefix arg, show the priority instead of setting it."
       (goto-char (point-max))
       (while (not (bobp))
 	(when (equal marker (org-get-at-bol 'org-marker))
-          (remove-text-properties (point-at-bol) (point-at-eol) '(display nil))
+          (remove-text-properties (line-beginning-position)
+				  (line-end-position)
+				  '(display nil))
 	  (org-move-to-column
 	   (- (/ (window-width nil t) (window-font-width)) (length stamp)) t)
           (add-text-properties
@@ -9579,7 +9581,7 @@ Called with a universal prefix arg, show the priority instead of setting it."
 	   (list 'display (org-add-props stamp nil
 			    'face '(secondary-selection default))))
 	  (beginning-of-line 1))
-	(beginning-of-line 0)))))
+	(org-agenda-previous-line)))))
 
 (defun org-agenda-date-prompt (arg)
   "Change the date of this item.  Date is prompted for, with default today.