From b0c5d8b2405559e8c5e4898ffa55af98144fa2d9 Mon Sep 17 00:00:00 2001 From: Igor Epstein Date: Sun, 1 Jan 2017 22:35:59 +0200 Subject: [PATCH] Fix padding of virtual buffers' paths --- ivy-rich.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ivy-rich.el b/ivy-rich.el index b644d90..5fee1ec 100644 --- a/ivy-rich.el +++ b/ivy-rich.el @@ -4,6 +4,7 @@ ;; Author: Yevgnen Koh ;; Package-Requires: ((emacs "24.4") (ivy "0.8.0")) +;; Package-Version: 20161228.2022 ;; Version: 0.0.1 ;; Keywords: ivy @@ -198,7 +199,8 @@ Currently the transformed format is 3 ; width of indicators ivy-rich-switch-buffer-buffer-size-length ivy-rich-switch-buffer-mode-max-length - ivy-rich-switch-buffer-project-max-length))) + (* 3 (length ivy-rich-switch-buffer-delimiter)) + (if (not (bound-and-true-p projectile-mode)) 0 ivy-rich-switch-buffer-project-max-length)))) (filename (propertize filename 'face 'ivy-virtual)) ;; Path (path (file-name-directory str)) @@ -209,7 +211,7 @@ Currently the transformed format is (format "%s%s%s" filename ivy-rich-switch-buffer-delimiter - (ivy-rich-switch-buffer-pad path (- (window-width) (length filename))))) + path)) str)))) (provide 'ivy-rich)