[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d374afe 31/54: Set truncate-lines in the minibuffer
From: |
Oleh Krehel |
Subject: |
[elpa] master d374afe 31/54: Set truncate-lines in the minibuffer |
Date: |
Tue, 29 Sep 2015 14:09:57 +0000 |
branch: master
commit d374afea36df19b5d6b654adc6018b25d6c1d8f2
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Set truncate-lines in the minibuffer
* ivy.el (ivy--minibuffer-setup): Update.
(ivy-format-function-default): Check `truncate-lines'. Check if
`fringe-mode' is bound.
Fixes #223
---
ivy.el | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/ivy.el b/ivy.el
index 8e5405b..30a4542 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1229,6 +1229,8 @@ Insert .* between each char."
(set (make-local-variable 'minibuffer-default-add-function)
(lambda ()
(list ivy--default)))
+ (when (display-graphic-p)
+ (setq truncate-lines t))
(setq-local max-mini-window-height ivy-height)
(add-hook 'post-command-hook #'ivy--exhibit nil t)
;; show completions with empty input
@@ -1502,14 +1504,16 @@ This string will be inserted into the minibuffer.")
(defun ivy-format-function-default (cands)
"Transform CANDS into a string for minibuffer."
- (let ((ww (- (window-width)
- (if (eq fringe-mode 0) 1 0))))
- (mapconcat
- (lambda (s)
- (if (> (length s) ww)
- (concat (substring s 0 (- ww 3)) "...")
- s))
- cands "\n")))
+ (if (bound-and-true-p truncate-lines)
+ (mapconcat #'identity cands "\n")
+ (let ((ww (- (window-width)
+ (if (and (boundp fringe-mode) (eq fringe-mode 0)) 1 0))))
+ (mapconcat
+ (lambda (s)
+ (if (> (length s) ww)
+ (concat (substring s 0 (- ww 3)) "...")
+ s))
+ cands "\n"))))
(defun ivy-format-function-arrow (cands)
"Transform CANDS into a string for minibuffer."
- [elpa] master d3f1f2c 18/54: Add extra faces for minibuffer highlighting, (continued)
- [elpa] master d3f1f2c 18/54: Add extra faces for minibuffer highlighting, Oleh Krehel, 2015/10/07
- [elpa] master 1bf45be 21/54: ivy.el (ivy--format-minibuffer-line): Fix nil regexp, Oleh Krehel, 2015/10/07
- [elpa] master e03d968 50/54: ivy.el (ivy--insert-prompt): Avoid negative length error, Oleh Krehel, 2015/10/07
- [elpa] master 7a2070b 45/54: Fix minibuffer collapse in text mode emacs, Oleh Krehel, 2015/10/07
- [elpa] master ba49407 53/54: counsel.el (counsel-ag-function): Improve for fancy faces, Oleh Krehel, 2015/10/07
- [elpa] master 00d8f08 12/54: counsel.el (counsel-org-tag): Now works in agenda, Oleh Krehel, 2015/10/07
- [elpa] master 860e276 13/54: Add swiper-multi command, Oleh Krehel, 2015/10/07
- [elpa] master 5269b79 07/54: When initial input contains a plus, escape it, Oleh Krehel, 2015/10/07
- [elpa] master 59908cd 20/54: Make ivy-current blend correctly for fancy minibuffer, Oleh Krehel, 2015/10/07
- [elpa] master 5eac62d 26/54: Move swiper-minibuffer-faces to ivy.el, Oleh Krehel, 2015/10/07
- [elpa] master d374afe 31/54: Set truncate-lines in the minibuffer,
Oleh Krehel <=
- [elpa] master a57ac0c 28/54: counsel.el (counsel-unicode-char): Add own history, Oleh Krehel, 2015/10/07
- [elpa] master 1319301 35/54: counsel.el (counsel-yank-pop-truncate): Add group, Oleh Krehel, 2015/10/07
- [elpa] master c4d33d3 36/54: ivy.el (ivy-format-function-default): Fix boundp bug, Oleh Krehel, 2015/10/07
- [elpa] master 7410d2d 29/54: ivy.el (ivy-format-function-default): Handle fringe-mode 0, Oleh Krehel, 2015/10/07
- [elpa] master a019441 41/54: Add autoloads to some important functions, Oleh Krehel, 2015/10/07
- [elpa] master ce33972 37/54: counsel.el (counsel-yank-pop): Add autoload, Oleh Krehel, 2015/10/07
- [elpa] master 9679bd7 46/54: swiper.el (swiper--ivy): Remove obsolete version check, Oleh Krehel, 2015/10/07