[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 83f7ae6 129/348: counsel.el (counsel-yank-pop): Fix candid
From: |
Oleh Krehel |
Subject: |
[elpa] master 83f7ae6 129/348: counsel.el (counsel-yank-pop): Fix candidates not showing sometimes |
Date: |
Sat, 8 Apr 2017 11:03:41 -0400 (EDT) |
branch: master
commit 83f7ae66056291be5c1c982a742cebc8b59c1406
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-yank-pop): Fix candidates not showing sometimes
* ivy.el (ivy-cleanup-string): New defun.
* swiper.el (swiper--candidates): Use `ivy-cleanup-string'.
* counsel.el (counsel-yank-pop): Use `ivy-cleanup-string'.
---
counsel.el | 12 +++++++-----
ivy.el | 5 +++++
swiper.el | 2 +-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/counsel.el b/counsel.el
index 3fbb2eb..9101d03 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2040,11 +2040,13 @@ INITIAL-INPUT can be given as the initial minibuffer
input."
(point))))
(setq ivy-completion-beg (point))
(setq ivy-completion-end (point)))
- (let ((candidates (cl-remove-if
- (lambda (s)
- (or (< (length s) 3)
- (string-match "\\`[\n[:blank:]]+\\'" s)))
- (delete-dups kill-ring))))
+ (let ((candidates
+ (mapcar #'ivy-cleanup-string
+ (cl-remove-if
+ (lambda (s)
+ (or (< (length s) 3)
+ (string-match "\\`[\n[:blank:]]+\\'" s)))
+ (delete-dups kill-ring)))))
(let ((ivy-format-function #'counsel--yank-pop-format-function)
(ivy-height 5))
(ivy-read "kill-ring: " candidates
diff --git a/ivy.el b/ivy.el
index aa32186..f9f1d97 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1979,6 +1979,11 @@ depending on the number of candidates."
(goto-char (minibuffer-prompt-end))
(delete-region (line-end-position) (point-max))))
+(defun ivy-cleanup-string (str)
+ "Remove unwanted text properties from STR."
+ (remove-text-properties 0 (length str) '(field) str)
+ str)
+
(defvar ivy-set-prompt-text-properties-function
'ivy-set-prompt-text-properties-default
"Function to set the text properties of the default ivy prompt.
diff --git a/swiper.el b/swiper.el
index cc3c741..7cb95a4 100644
--- a/swiper.el
+++ b/swiper.el
@@ -311,7 +311,7 @@ numbers; replaces calculating the width from buffer line
count."
(buffer-substring
(point)
(line-end-position)))))))
- (remove-text-properties 0 (length str) '(field) str)
+ (setq str (ivy-cleanup-string str))
(let ((line-number-str
(format swiper--format-spec (cl-incf line-number))))
(if swiper-include-line-number-in-search
- [elpa] master 055e7b8 102/348: counsel.el (counsel-git-grep-cmd-history): Update default, (continued)
- [elpa] master 055e7b8 102/348: counsel.el (counsel-git-grep-cmd-history): Update default, Oleh Krehel, 2017/04/08
- [elpa] master 7e188d5 100/348: counsel.el (counsel-git-grep): Customize re-builder, Oleh Krehel, 2017/04/08
- [elpa] master 1da8b6c 086/348: Fix foo!bar syntax for swiper, Oleh Krehel, 2017/04/08
- [elpa] master 57c0f5e 095/348: ivy.el (ivy-set-view-recur): Account for mulitple same kind splits, Oleh Krehel, 2017/04/08
- [elpa] master c84b681 109/348: ivy.el (ivy-switch-buffer): Reset index to 0 on input, Oleh Krehel, 2017/04/08
- [elpa] master 0f4acb3 115/348: Make swiper-all async, Oleh Krehel, 2017/04/08
- [elpa] master 81e14ce 111/348: counsel.el (counsel-semantic): Fix warnings, Oleh Krehel, 2017/04/08
- [elpa] master 9e87993 113/348: ivy.el (ivy-state): directory field stores default-directory, Oleh Krehel, 2017/04/08
- [elpa] master 1fa9a28 118/348: Ensure regex is a sting, Oleh Krehel, 2017/04/08
- [elpa] master 70a5360 127/348: counsel.el (counsel-git-grep-proj-function): Use greedy regex, Oleh Krehel, 2017/04/08
- [elpa] master 83f7ae6 129/348: counsel.el (counsel-yank-pop): Fix candidates not showing sometimes,
Oleh Krehel <=
- [elpa] master 8f282a5 136/348: counsel.el (counsel-git-grep-action): Reveal text in outlines, Oleh Krehel, 2017/04/08
- [elpa] master bc96feb 141/348: ivy.el (ivy--recompute-index): Update condition, Oleh Krehel, 2017/04/08
- [elpa] master 45e29af 147/348: counsel.el: Fix compile warning, Oleh Krehel, 2017/04/08
- [elpa] master 04c2160 151/348: Replace references to evil-jumper with evil-jumps, Oleh Krehel, 2017/04/08
- [elpa] master c2974a5 154/348: Depend on Emacs 24.3, since user-error is used, Oleh Krehel, 2017/04/08
- [elpa] master e9db958 145/348: Rename ivy-recentf -> counsel-recentf, Oleh Krehel, 2017/04/08
- [elpa] master 78be161 165/348: Fix alist and :predicate interaction, Oleh Krehel, 2017/04/08
- [elpa] master 1c09e99 156/348: ivy.el (ivy-call): Use select-window, not with-ivy-window, Oleh Krehel, 2017/04/08
- [elpa] master ec42e8a 177/348: swiper.el (swiper-multi-action-1): Fix regression, Oleh Krehel, 2017/04/08
- [elpa] master 778c325 183/348: ivy.el (ivy-call): Don't switch windows for 'identity action, Oleh Krehel, 2017/04/08