emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/valign 16ff947 08/15: Patch an outline bug.


From: Stefan Monnier
Subject: [elpa] externals/valign 16ff947 08/15: Patch an outline bug.
Date: Tue, 16 Mar 2021 00:01:31 -0400 (EDT)

branch: externals/valign
commit 16ff9472517d48ffb0f0c4830713767ffb576452
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>

    Patch an outline bug.
    
    * valign.el (valign--flag-region-advice): Change beg to (max 0 beg).
---
 valign.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/valign.el b/valign.el
index 71c008d..fef2611 100644
--- a/valign.el
+++ b/valign.el
@@ -1046,7 +1046,9 @@ Force align if FORCE non-nil."
 FLAG is the same as in ‘org-flag-region’."
   (when (and valign-mode (not flag))
     (with-silent-modifications
-      (put-text-property beg end 'fontified nil))))
+      ;; Outline has a bug that passes 0 as a buffer position
+      ;; to `org-flag-region', so we need to patch that up.
+      (put-text-property (max 1 beg) end 'fontified nil))))
 
 (defun valign--tab-advice (&rest _)
   "Force realign after tab so user can force realign."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]