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

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

[elpa] master ce557d1 119/167: swiper.el (swiper--candidates): Replace "


From: Oleh Krehel
Subject: [elpa] master ce557d1 119/167: swiper.el (swiper--candidates): Replace "\t" with " "
Date: Tue, 08 Dec 2015 10:50:26 +0000

branch: master
commit ce557d1ec13844b4d901379404468718376ae784
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    swiper.el (swiper--candidates): Replace "\t" with "    "
    
    This will allow the minibuffer strings to align nicer for
    `swiper-multi'.
---
 swiper.el |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/swiper.el b/swiper.el
index 7d2741a..15d5478 100644
--- a/swiper.el
+++ b/swiper.el
@@ -264,13 +264,17 @@
           (goto-char (point-min))
           (swiper-font-lock-ensure)
           (while (< (point) (point-max))
-            (let ((str (concat " " (buffer-substring
-                                    (point)
-                                    (if swiper-use-visual-line
-                                        (save-excursion
-                                          (end-of-visual-line)
-                                          (point))
-                                      (line-end-position))))))
+            (let ((str (concat
+                        " "
+                        (replace-regexp-in-string
+                         "\t" "    "
+                         (buffer-substring
+                          (point)
+                          (if swiper-use-visual-line
+                              (save-excursion
+                                (end-of-visual-line)
+                                (point))
+                            (line-end-position)))))))
               (put-text-property 0 1 'display
                                  (format swiper--format-spec
                                          (cl-incf line-number))



reply via email to

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