branch: master
commit ce557d1ec13844b4d901379404468718376ae784
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
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))