branch: externals/valign
commit 16ff9472517d48ffb0f0c4830713767ffb576452
Author: Yuan Fu <[email protected]>
Commit: Yuan Fu <[email protected]>

    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