[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master f180451 179/348: swiper.el (swiper-all): Fix window-width
From: |
Oleh Krehel |
Subject: |
[elpa] master f180451 179/348: swiper.el (swiper-all): Fix window-width in -nw |
Date: |
Sat, 8 Apr 2017 11:03:51 -0400 (EDT) |
branch: master
commit f180451217277e63b067aa3d06d5af69140e320d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el (swiper-all): Fix window-width in -nw
* swiper.el (swiper-window-width): New defvar. Dynamically rebound to
current frame width.
(swiper-all): Avoid continuation lines for emacs -nw.
---
swiper.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/swiper.el b/swiper.el
index d247460..43c3c43 100644
--- a/swiper.el
+++ b/swiper.el
@@ -786,8 +786,10 @@ Run `swiper' for those buffers."
(list "")
(setq ivy--old-cands (nreverse cands))))))
+(defvar swiper-window-width 80)
+
(defun swiper--all-format-function (cands)
- (let* ((ww (window-width))
+ (let* ((ww swiper-window-width)
(col2 1)
(cands-with-buffer
(mapcar (lambda (s)
@@ -825,7 +827,8 @@ Run `swiper' for those buffers."
(defun swiper-all ()
"Run `swiper' for all opened buffers."
(interactive)
- (let ((ivy-format-function #'swiper--all-format-function))
+ (let* ((swiper-window-width (- (frame-width) (if (display-graphic-p) 0 1)))
+ (ivy-format-function #'swiper--all-format-function))
(ivy-read "swiper-all: " 'swiper-all-function
:action 'swiper-all-action
:unwind #'swiper--cleanup
- [elpa] master 01b0195 306/348: Correct Circe major-modes in ...-font-lock-exclude, (continued)
- [elpa] master 01b0195 306/348: Correct Circe major-modes in ...-font-lock-exclude, Oleh Krehel, 2017/04/08
- [elpa] master 94a466f 341/348: ivy.el: Clean up whitespace, Oleh Krehel, 2017/04/08
- [elpa] master 1220781 131/348: counsel.el (counsel-find-file): Speed up opening remotes, Oleh Krehel, 2017/04/08
- [elpa] master 63dd0d3 134/348: counsel.el (counsel-git-grep-proj-function): Use greedy regex, Oleh Krehel, 2017/04/08
- [elpa] master d41212e 172/348: ivy.el (ivy--insert-minibuffer): Handle empty string, Oleh Krehel, 2017/04/08
- [elpa] master 8632f33 175/348: counsel.el: Update description comment., Oleh Krehel, 2017/04/08
- [elpa] master 89a6830 186/348: counsel.el (counsel-at-git-issue-p): Fix for newer magit, Oleh Krehel, 2017/04/08
- [elpa] master 3d0e4a5 184/348: counsel.el (counsel-locate-action-extern): Update on w32, Oleh Krehel, 2017/04/08
- [elpa] master db9d7b8 188/348: Fix counsel-grep for files with spaces in the name, Oleh Krehel, 2017/04/08
- [elpa] master e7d6dab 185/348: counsel.el (counsel-mode): Add "C-r" bindings, Oleh Krehel, 2017/04/08
- [elpa] master f180451 179/348: swiper.el (swiper-all): Fix window-width in -nw,
Oleh Krehel <=
- [elpa] master e11c926 182/348: Allow to "C-y" a "/ssh:" file name, Oleh Krehel, 2017/04/08
- [elpa] master 4e6921f 153/348: ivy.el: Apply alist change to ivy-occur, Oleh Krehel, 2017/04/08
- [elpa] master 36b00cb 155/348: Use EVM in travis to test across multiple Emacs versions, Oleh Krehel, 2017/04/08
- [elpa] master f6bd64b 164/348: ivy.el (ivy--flx-featurep): New defvar, Oleh Krehel, 2017/04/08
- [elpa] master fc5c8fc 159/348: Fix ivy-occur-press for swiper, Oleh Krehel, 2017/04/08
- [elpa] master e98883f 162/348: Improve fuzzy swiper highlight, Oleh Krehel, 2017/04/08
- [elpa] master 9b28927 187/348: counsel.el (counsel-hydra-heads): Fixup, Oleh Krehel, 2017/04/08
- [elpa] master 00219da 181/348: Fix for older Emacs, Oleh Krehel, 2017/04/08
- [elpa] master 8f87f74 178/348: counsel.el (counsel-git-grep): Update for Windows, Oleh Krehel, 2017/04/08
- [elpa] master 79105a5 208/348: counsel.el (counsel-info-lookup-symbol): Add preselect, Oleh Krehel, 2017/04/08