[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 044f82c 106/395: ivy.el (ivy-set-text): Add
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 044f82c 106/395: ivy.el (ivy-set-text): Add |
Date: |
Thu, 25 Feb 2021 08:31:41 -0500 (EST) |
branch: externals/ivy-hydra
commit 044f82c75a5997fcae994fbc15e66fda713ef159
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
ivy.el (ivy-set-text): Add
---
counsel.el | 8 ++++----
ivy.el | 24 ++++++++++++++----------
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/counsel.el b/counsel.el
index 1dd867c..fd0dd9f 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2104,7 +2104,7 @@ See variable `counsel-up-directory-level'."
(ivy-set-index 0)
(setq ivy--directory "")
(setq ivy--all-candidates nil)
- (setq ivy-text "")
+ (ivy-set-text "")
(delete-minibuffer-contents)
(insert up-dir))
(if (and counsel-up-directory-level (not (string= ivy-text "")))
@@ -2937,9 +2937,9 @@ Works for `counsel-git-grep', `counsel-ag', etc."
(unless (eq major-mode 'ivy-occur-grep-mode)
(ivy-occur-grep-mode)
(setq default-directory (ivy-state-directory ivy-last)))
- (setq ivy-text
- (and (string-match "\"\\(.*\\)\"" (buffer-name))
- (match-string 1 (buffer-name))))
+ (ivy-set-text
+ (and (string-match "\"\\(.*\\)\"" (buffer-name))
+ (match-string 1 (buffer-name))))
(let* ((cmd
(if (functionp cmd-template)
(funcall cmd-template ivy-text)
diff --git a/ivy.el b/ivy.el
index 9008c1c..d1ce135 100644
--- a/ivy.el
+++ b/ivy.el
@@ -563,6 +563,10 @@ of `history-length'.")
(defvar ivy-text ""
"Store the user's string as it is typed in.")
+(defun ivy-set-text (str)
+ "Set `ivy-text' to STR."
+ (setq ivy-text str))
+
(defvar ivy--index 0
"Store the index of the current candidate.")
@@ -1070,11 +1074,11 @@ contains a single candidate.")
(cond ((string-match
"\\`\\([^/]+?\\):\\(?:\\(.*\\)@\\)?\\(.*\\)\\'"
ivy-text)
- (setq ivy-text (ivy-state-current ivy-last)))
+ (ivy-set-text (ivy-state-current ivy-last)))
((string-match
"\\`\\([^/]+?\\):\\(?:\\(.*\\)@\\)?\\(.*\\)\\'"
(ivy-state-current ivy-last))
- (setq ivy-text (ivy-state-current ivy-last)))))
+ (ivy-set-text (ivy-state-current ivy-last)))))
(string-match
"\\`/\\([^/]+?\\):\\(?:\\(.*\\)@\\)?\\(.*\\)\\'"
ivy-text)))
@@ -1111,7 +1115,7 @@ If the text hasn't changed as a result, forward to
`ivy-alt-done'."
(let ((default-directory ivy--directory)
dir)
(minibuffer-complete)
- (setq ivy-text (ivy--input))
+ (ivy-set-text (ivy--input))
(when (setq dir (ivy-expand-file-if-directory ivy-text))
(ivy--cd dir))))
(t
@@ -1161,10 +1165,10 @@ If the text hasn't changed as a result, forward to
`ivy-alt-done'."
(concat "^" new)
new))
(insert
- (setq ivy-text
- (concat
- (mapconcat #'identity parts " ")
- (and ivy-tab-space (not (= (length ivy--old-cands) 1)) "
"))))
+ (ivy-set-text
+ (concat
+ (mapconcat #'identity parts " ")
+ (and ivy-tab-space (not (= (length ivy--old-cands) 1)) " "))))
(ivy--partial-cd-for-single-directory)
t))))
@@ -1603,7 +1607,7 @@ If so, move to that directory, while keeping only the
file name."
(lambda (s) (substring s 1))
(tramp-get-completion-methods ""))
#'string<))))
- (setq ivy-text "")
+ (ivy-set-text "")
(setf (ivy-state-directory ivy-last) dir)
(delete-minibuffer-contents)))
@@ -2236,7 +2240,7 @@ This is useful for recursive `ivy-read'."
(setq ivy--regexp-quote #'regexp-quote)
(setq ivy--old-text "")
(setq ivy--full-length nil)
- (setq ivy-text "")
+ (ivy-set-text "")
(setq ivy--index 0)
(setq ivy-calling nil)
(setq ivy-use-ignore ivy-use-ignore-default)
@@ -3258,7 +3262,7 @@ Should be run via minibuffer `post-command-hook'."
(when (memq 'ivy--queue-exhibit post-command-hook)
(let ((inhibit-field-text-motion nil))
(constrain-to-field nil (point-max)))
- (setq ivy-text (ivy--input))
+ (ivy-set-text (ivy--input))
(if (ivy-state-dynamic-collection ivy-last)
;; while-no-input would cause annoying
;; "Waiting for process to die...done" message interruptions
- [elpa] externals/ivy-hydra 0b5c08a 308/395: counsel.el (counsel-grep-like-occur): Fix copy-sequence for cl-mapcan, (continued)
- [elpa] externals/ivy-hydra 0b5c08a 308/395: counsel.el (counsel-grep-like-occur): Fix copy-sequence for cl-mapcan, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra aef1d4d 302/395: ivy.el (ivy-configure): Add :parent keyword, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra cbcb7ad 034/395: swiper.el (swiper-isearch-format-function): Refactor, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 388e0d4 043/395: ivy.el (ivy--magic-tilde-directory): Fix for non-standard home path, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5e393b0 047/395: .travis.yml (env): Bump to emacs-26.3-travis, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 2d4d6d6 076/395: Use text, not "current", in -dispatching-done when no matches, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8c23823 073/395: ivy-test.el (ivy-swiper-wgrep): Re-enable on 24.5, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9e7f21a 078/395: ivy.el (ivy-completing-read): Fix require-match arg being symbol, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3c6e5da 091/395: Remove counsel--grep-mode-occur, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e22c8df 103/395: counsel.el (counsel-git-cands): Avoid an extra call to counsel-git-root, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 044f82c 106/395: ivy.el (ivy-set-text): Add,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 0a08436 169/395: ivy.el (ivy--set-candidates): Delete duplicates only for extra sources, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 22422dd 219/395: counsel.el (counsel-fonts): Add a custom transformer with font sample, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7b3b672 230/395: counsel.el (counsel-company): Fix difference between company-common and company-prefix, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d3c6cc1 205/395: Adapt tests to when wgrep is not installed, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5ac1c97 190/395: ivy.el (ivy-dispatching-call): Fix ivy-text being "" for ivy-read-action-ivy, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7abf656 192/395: Allow counsel-cd to run even if recursive minibuffers are not enabled, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra dd8f519 206/395: Fix ivy-completion-in-region return value, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 50b02a0 222/395: Remove unused lexical variable in recent test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a5c6ef9 231/395: counsel-kmacro: Create separator with defcustom instead of defvar., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4f6bd9e 210/395: .dir-locals.el (outline-regexp): "^(" is not an outline start, Basil L. Contovounesios, 2021/02/25