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.
This commit is contained in:
Bastien 2020-02-05 00:36:42 +01:00
parent d8c51531c0
commit 19676dce75

View file

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