branch: externals/consult
commit c1ad36a582ebb6e11bee37e3040070a75c8f0799
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    consult--line-prefix: Minor cleanup
---
 CHANGELOG.org | 1 +
 consult.el    | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 34735b4fd9..0c18b8bbc3 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -4,6 +4,7 @@
 
 * Development
 
+- Bugfixes
 - Removed obsolete =consult-recent-file-filter= and 
=consult-preview-excluded-hooks=
 
 * Version 0.17 (2022-04-22)
diff --git a/consult.el b/consult.el
index efb91df349..7e1a0312f5 100644
--- a/consult.el
+++ b/consult.el
@@ -1057,11 +1057,11 @@ CURR-LINE is the current line number."
   (let* ((width (length (number-to-string (line-number-at-pos
                                            (point-max)
                                            consult-line-numbers-widen))))
-         (fmt-before (propertize (format "%%%dd " width) 'face 
'consult-line-number-wrapped))
-         (fmt-after (propertize (format "%%%dd " width) 'face 
'consult-line-number-prefix)))
+         (before (format #("%%%dd " 0 6 (face consult-line-number-wrapped)) 
width))
+         (after (format #("%%%dd " 0 6 (face consult-line-number-prefix)) 
width)))
     (lambda (cand)
       (let ((line (cdr (get-text-property 0 'consult-location cand))))
-        (list cand (format (if (< line curr-line) fmt-before fmt-after) line) 
"")))))
+        (list cand (format (if (< line curr-line) before after) line) "")))))
 
 (defun consult--location-candidate (cand marker line &rest props)
   "Add MARKER and LINE as 'consult-location text property to CAND.

Reply via email to