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

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

[elpa] externals/org-modern c82b50a61d: Fix org-modern-progress (Fix #82


From: ELPA Syncer
Subject: [elpa] externals/org-modern c82b50a61d: Fix org-modern-progress (Fix #82)
Date: Sat, 30 Jul 2022 04:57:41 -0400 (EDT)

branch: externals/org-modern
commit c82b50a61d04571e11c242fb91944753d8bf945c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Fix org-modern-progress (Fix #82)
---
 org-modern.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/org-modern.el b/org-modern.el
index 42ed710dcd..f3b330b5ee 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -323,16 +323,16 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
 (defun org-modern--progress ()
   "Prettify headline todo progress."
   (put-text-property
-   (match-beginning 1) (1+ (match-beginning 1)) 'display
+   (match-beginning 2) (match-end 2) 'display
    (aref org-modern--progress-cache
          (floor
           (* (1- (length org-modern--progress-cache))
-             (if (match-beginning 2)
-                 (* 0.01 (string-to-number (match-string 2)))
-               (let ((q (string-to-number (match-string 4))))
+             (if (match-beginning 3)
+                 (* 0.01 (string-to-number (match-string 3)))
+               (let ((q (string-to-number (match-string 5))))
                  (if (= q 0)
                      1.0
-                   (/ (* 1.0 (string-to-number (match-string 3))) q)))))))))
+                   (/ (* 1.0 (string-to-number (match-string 4))) q)))))))))
 
 (defun org-modern--tag ()
   "Prettify headline tags."
@@ -622,10 +622,10 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
            (1 '(face org-modern-label display #("  " 1 2 (face 
(:strike-through t) cursor t))) t)
            (2 '(face org-modern-label display #("  " 0 1 (face 
(:strike-through t)))) t))))
       (when org-modern-statistics
-        `((" 
\\(\\[\\(?:\\([0-9]+\\)%\\|\\([0-9]+\\)/\\([0-9]+\\)\\)\\(\\]\\)\\)"
-           (0 ,(if org-modern-progress '(org-modern--progress) ''(face nil 
display " ")))
+        `((" 
\\(\\(\\[\\)\\(?:\\([0-9]+\\)%\\|\\([0-9]+\\)/\\([0-9]+\\)\\)\\(\\]\\)\\)"
            (1 '(face org-modern-statistics) t)
-           (5 '(face nil display " ")))))))
+           (2 ,(if org-modern-progress '(org-modern--progress) ''(face nil 
display " ")))
+           (6 '(face nil display " ")))))))
     (font-lock-add-keywords nil org-modern--font-lock-keywords 'append)
     (advice-add #'org-unfontify-region :after #'org-modern--unfontify))
    (t (font-lock-remove-keywords nil org-modern--font-lock-keywords)))



reply via email to

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