[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy b85f7840a2 03/10: counsel.el (counsel-yank-pop-acti
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy b85f7840a2 03/10: counsel.el (counsel-yank-pop-action): Adjust for vterm-mode |
Date: |
Sun, 11 Sep 2022 08:15:33 -0400 (EDT) |
branch: externals/ivy
commit b85f7840a26c4b91fc5006f0cbeb7db338151834
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
counsel.el (counsel-yank-pop-action): Adjust for vterm-mode
---
counsel.el | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/counsel.el b/counsel.el
index bae16a8a3c..caf595d971 100644
--- a/counsel.el
+++ b/counsel.el
@@ -4499,24 +4499,26 @@ mark, as per \\[universal-argument] \\[yank]."
"Like `yank-pop', but insert the kill corresponding to S.
Signal a `buffer-read-only' error if called from a read-only
buffer position."
- (with-ivy-window
- (barf-if-buffer-read-only)
- (setq yank-window-start (window-start))
- (unless (eq last-command 'yank)
- ;; Avoid unexpected deletions with `yank-handler' properties.
- (setq yank-undo-function nil))
- (condition-case nil
- (let (;; Deceive `yank-pop'.
- (last-command 'yank)
- ;; Avoid unexpected additions to `kill-ring'.
- interprogram-paste-function)
- (yank-pop (counsel--yank-pop-position s)))
- (error
- ;; Support strings not present in the kill ring.
- (insert s)))
- (when (funcall (if counsel-yank-pop-after-point #'> #'<)
- (point) (mark t))
- (exchange-point-and-mark t))))
+ (if (eq major-mode 'vterm-mode)
+ (let ((inhibit-read-only t))
+ (vterm-insert s)))
+ (barf-if-buffer-read-only)
+ (setq yank-window-start (window-start))
+ (unless (eq last-command 'yank)
+ ;; Avoid unexpected deletions with `yank-handler' properties.
+ (setq yank-undo-function nil))
+ (condition-case nil
+ (let (;; Deceive `yank-pop'.
+ (last-command 'yank)
+ ;; Avoid unexpected additions to `kill-ring'.
+ interprogram-paste-function)
+ (yank-pop (counsel--yank-pop-position s)))
+ (error
+ ;; Support strings not present in the kill ring.
+ (insert s)))
+ (when (funcall (if counsel-yank-pop-after-point #'> #'<)
+ (point) (mark t))
+ (exchange-point-and-mark t)))
(defun counsel-yank-pop-action-remove (s)
"Remove all occurrences of S from the kill ring."
- [elpa] externals/ivy updated (166b3161a3 -> d9c2053316), Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy 2c23dae5ea 01/10: counsel.el (counsel--imenu-candidates): Specialize python-mode, Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy e322890809 05/10: ivy.el (ivy-occur-flush-lines): Add, Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy fa2f99bdc6 06/10: Fix for issue #2805 by using company-finish on counsel-company., Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy 2cfccf44a8 07/10: Fix company-prefix and company-common when using counsel-company., Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy d9c2053316 10/10: Merge branch 'master' into externals/ivy, Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy e9c0fb953d 09/10: Clean up compatibility of recent changes, Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy 88715a5e1e 04/10: counsel.el (counsel-git-history): Add, Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy 4c370d6677 08/10: Refactored counsel-company simplifying and removing uneeded code., Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy ee7f7f8c79 02/10: ivy-overlay.el (ivy-display-function-overlay): Check org offset based on Emacs version, Basil L. Contovounesios, 2022/09/11
- [elpa] externals/ivy b85f7840a2 03/10: counsel.el (counsel-yank-pop-action): Adjust for vterm-mode,
Basil L. Contovounesios <=