فهرست منبع

`org-cycle-item-indentation' works only on empty items.

* org-list.el (org-cycle-item-indentation): Cycle when the whole item
  only contains bullet and maybe a checkbox. Previously, TAB would
  cycle when the first line of the item was blank.
Nicolas Goaziou 14 سال پیش
والد
کامیت
eabb018913
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      lisp/org-list.el

+ 5 - 3
lisp/org-list.el

@@ -927,9 +927,11 @@ Assumes cursor in item line."
 (defun org-cycle-item-indentation ()
   (let ((org-suppress-item-indentation t)
 	(org-adapt-indentation nil))
-    (when (and (looking-at "[ \t]*$")
-	       (or (org-at-description-p) (org-at-item-checkbox-p) (org-at-item-p))
-	       (>= (match-end 0) (save-excursion (skip-chars-backward " \r\t\n") (point))))
+    (when (and (or (org-at-description-p) (org-at-item-checkbox-p) (org-at-item-p))
+	       (>= (match-end 0) (save-excursion
+                                   (org-end-of-item-text-before-children)
+                                   (skip-chars-backward " \r\t\n")
+                                   (point))))
       (setq this-command 'org-cycle-item-indentation)
       ;; When in the middle of the cycle, try to outdent first. If it
       ;; fails, and point is still at initial position, indent. Else,