Browse Source

Can't insert new item after `org-list-bottom-point' anymore.

Nicolas Goaziou 14 years ago
parent
commit
a42f8066d4
2 changed files with 4 additions and 2 deletions
  1. 2 1
      lisp/org-list.el
  2. 2 1
      lisp/org-timer.el

+ 2 - 1
lisp/org-list.el

@@ -697,7 +697,8 @@ new item will be created before the current one. Return t when
 things worked, nil when we are not in an item, or item is
 invisible."
   (unless (or (not (org-in-item-p))
-	      (org-invisible-p))
+	      (org-invisible-p)
+	      (< (org-list-bottom-point) (point)))
     (if (save-excursion
 	  (org-beginning-of-item)
 	  (org-at-item-timer-p))

+ 2 - 1
lisp/org-timer.el

@@ -203,7 +203,8 @@ it in the buffer."
   (cond
    ;; In a timer list, insert with `org-list-insert-item-generic'.
    ((and (org-in-item-p)
-	 (save-excursion (org-beginning-of-item) (org-at-item-timer-p)))
+	 (save-excursion (org-beginning-of-item) (org-at-item-timer-p))
+	 (>= (org-list-bottom-point) (point)))
     (org-list-insert-item-generic
      (point) nil (concat (org-timer (when arg '(4)) t) ":: ")))
    ;; In a list of another type, don't break anything: throw an error.