lisp/org-list.el (org-list-swap-items): Fix re-folding after swap

This commit is contained in:
Ihor Radchenko 2024-02-02 16:23:50 +01:00
parent 96944e8d43
commit 83bc81b750
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -1152,7 +1152,7 @@ This function modifies STRUCT."
(org-fold-core-regions (cdr folds) :relative beg-A)
(org-fold-core-regions
(car folds)
:relative (+ beg-B (- size-B size-A (length between-A-no-blank-and-B))))
:relative (+ beg-A size-B (length between-A-no-blank-and-B)))
;; 2. Now modify struct. No need to re-read the list, the
;; transformation is just a shift of positions. Some special
;; attention is required for items ending at END-A and END-B