[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra a33af9b 356/395: Unset yank-undo-function in
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra a33af9b 356/395: Unset yank-undo-function in counsel-yank-pop |
Date: |
Thu, 25 Feb 2021 08:32:37 -0500 (EST) |
branch: externals/ivy-hydra
commit a33af9bfef82d4ab735728a30e91e8563224c5f8
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
Unset yank-undo-function in counsel-yank-pop
* counsel.el (counsel-yank-pop-action): Unset yank-undo-function
before calling yank-pop, to avoid deleting the region when
yank-undo-function is set but the last command was not really a
yank. Suggested by Gustavo Barros.
Fixes #2714.
---
counsel.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/counsel.el b/counsel.el
index db0e612..b762b1a 100644
--- a/counsel.el
+++ b/counsel.el
@@ -4432,13 +4432,18 @@ Signal a `buffer-read-only' error if called from a
read-only
buffer position."
(with-ivy-window
(barf-if-buffer-read-only)
- (setq last-command 'yank)
(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
- ;; Avoid unexpected additions to `kill-ring'
- (let (interprogram-paste-function)
+ (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))
- [elpa] externals/ivy-hydra d790e53 278/395: doc/ivy.org: Mention multiple-session ivy-resume, (continued)
- [elpa] externals/ivy-hydra d790e53 278/395: doc/ivy.org: Mention multiple-session ivy-resume, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra fb8804d 280/395: ivy.el (ivy--call-marked): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 489bc57 284/395: counsel.el (counsel-rg-base-command): Make the default a list, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7fd0662 285/395: counsel.el (counsel-grep-like-occur): Fix for marked files in dired, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f1c57a1 292/395: counsel.el (counsel-async-command-delay): Set the default to 0.0, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra fb73bfe 288/395: counsel.el (counsel--rg-targets): Fix regression, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 2b26f83 289/395: counsel.el (counsel--sync-sentinel-on-exit): Don't reset index, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6a576cb 293/395: ivy-avy.el: Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e42e0b3 295/395: ivy-hydra.el (ivy-minibuffer-grow): Move, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9fddf44 297/395: ivy-faces.el: Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a33af9b 356/395: Unset yank-undo-function in counsel-yank-pop,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 98c61de 299/395: ivy.el (ivy-set-display-transformer): Mark obsolete, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 177d7e0 325/395: Fix definition of ‘counsel--browse-history’., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a877961 330/395: ivy.el (ivy-call): Don't modify default-directory, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 39ede5f 324/395: targets/plain.el: Require ivy-avy, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d951004 336/395: doc: Conflate installation description, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3a2c5b2 300/395: counsel.el: Mark obsolete the functions that can be replaced by complete-symbol, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3ecf828 344/395: ivy.el (ivy-switch-buffer): Don't lose the current index, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 01d9f55 343/395: ivy.el: Fix minibuffer highlighter selction, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d4fd99f 316/395: Respect original default choice when deduplicating extra actions, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 62815d9 311/395: Makefile: Compile ivy-avy.el, Basil L. Contovounesios, 2021/02/25