Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix padding of virtual buffers' paths #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ivy-rich.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

;; Author: Yevgnen Koh <[email protected]>
;; Package-Requires: ((emacs "24.4") (ivy "0.8.0"))
;; Package-Version: 20161228.2022
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package version is auto generated, so this line is not necessary.

;; Version: 0.0.1
;; Keywords: ivy

Expand Down Expand Up @@ -200,7 +201,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))
Expand All @@ -211,6 +213,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)
;; Fixed the unexpected wrapping in terminal
Expand Down