From 83bc81b7509e19931fe10a78c6a7549155df538d Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 2 Feb 2024 16:23:50 +0100 Subject: [PATCH] lisp/org-list.el (org-list-swap-items): Fix re-folding after swap --- lisp/org-list.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-list.el b/lisp/org-list.el index 590f9d759..fca3758c8 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -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