[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org 5da9d6810b 2/4: org-element--cache-before-change: F
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org 5da9d6810b 2/4: org-element--cache-before-change: Fix handling sensitive edits at bol |
Date: |
Sat, 5 Feb 2022 06:57:45 -0500 (EST) |
branch: externals/org
commit 5da9d6810bd49e6e3cad6deef4fac6e34d2d4ec0
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
org-element--cache-before-change: Fix handling sensitive edits at bol
* lisp/org-element.el (org-element--cache-before-change): Fix
optimisation when edits are involving element :end position. Checking
that END is at BOL fails when we insert at the beginning of a
headline.
---
lisp/org-element.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 90018afe2d..c5d67aca36 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6575,7 +6575,9 @@ The function returns the new value of
`org-element--cache-change-warning'."
(beginning-of-line)
(let ((bottom (save-excursion
(goto-char end)
- (if (bolp)
+ (if (and (bolp)
+ ;; When beg == end, still extent to eol.
+ (> (point) beg))
;; FIXME: Potential pitfall.
;; We are appending to an element end.
;; Unless the last inserted char is not