Fix non-integer max-length in *buffer-path mode-line segment
This commit is contained in:
parent
d303a1eb6f
commit
53ac744800
1 changed files with 3 additions and 2 deletions
|
@ -247,8 +247,8 @@
|
||||||
(spaceline-define-segment *buffer-path
|
(spaceline-define-segment *buffer-path
|
||||||
(if buffer-file-name
|
(if buffer-file-name
|
||||||
(let* ((project-path (let (projectile-require-project-root) (projectile-project-root)))
|
(let* ((project-path (let (projectile-require-project-root) (projectile-project-root)))
|
||||||
(buffer-path (file-relative-name buffer-file-name project-path))
|
(buffer-path (f-relative buffer-file-name project-path))
|
||||||
(max-length (/ (window-width) 2))
|
(max-length (truncate (/ (window-width) 1.75)))
|
||||||
(path-len (length buffer-path)))
|
(path-len (length buffer-path)))
|
||||||
(concat (file-name-nondirectory (directory-file-name project-path))
|
(concat (file-name-nondirectory (directory-file-name project-path))
|
||||||
"/"
|
"/"
|
||||||
|
@ -400,6 +400,7 @@ iedit."
|
||||||
|
|
||||||
(spaceline-define-segment *buffer-size
|
(spaceline-define-segment *buffer-size
|
||||||
(powerline-buffer-size)
|
(powerline-buffer-size)
|
||||||
|
:when (not (eq major-mode 'org-mode))
|
||||||
:tight-right t
|
:tight-right t
|
||||||
:skip-alternate t)
|
:skip-alternate t)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue