diff options
Diffstat (limited to 'lisp/org/org-indent.el')
-rw-r--r-- | lisp/org/org-indent.el | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index fd19b14db6b..de237415cc8 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el @@ -4,7 +4,7 @@ ;; ;; Author: Carsten Dominik <carsten.dominik@gmail.com> ;; Keywords: outlines, hypermedia, calendar, wp -;; Homepage: https://orgmode.org +;; URL: https://orgmode.org ;; ;; This file is part of GNU Emacs. ;; @@ -37,6 +37,9 @@ ;;; Code: (require 'org-macs) +(org-assert-version) + +(require 'org-macs) (require 'org-compat) (require 'org) @@ -330,7 +333,7 @@ stopped." (let* ((case-fold-search t) (limited-re (org-get-limited-outline-regexp)) (level (or (org-current-level) 0)) - (time-limit (and delay (org-time-add nil delay)))) + (time-limit (and delay (time-add nil delay)))) ;; For each line, set `line-prefix' and `wrap-prefix' ;; properties depending on the type of line (headline, inline ;; task, item or other). @@ -343,7 +346,7 @@ stopped." ;; In asynchronous mode, take a break of ;; `org-indent-agent-resume-delay' every DELAY to avoid ;; blocking any other idle timer or process output. - ((and delay (org-time-less-p time-limit nil)) + ((and delay (time-less-p time-limit nil)) (setq org-indent-agent-resume-timer (run-with-idle-timer (time-add (current-idle-time) org-indent-agent-resume-delay) @@ -409,7 +412,13 @@ This function is meant to be called by `after-change-functions'." (goto-char beg) (beginning-of-line) (re-search-forward - (org-with-limited-levels org-outline-regexp-bol) end t))) + (org-with-limited-levels org-outline-regexp-bol) + (save-excursion + (goto-char end) + ;; Extend to headline if END is within its + ;; headline stars. + (line-end-position)) + t))) (let ((end (save-excursion (goto-char end) (org-with-limited-levels (outline-next-heading)) |