emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 15c57fc: * lisp/simple.el (read-from-kill-ring): Fix the case of


From: Juri Linkov
Subject: master 15c57fc: * lisp/simple.el (read-from-kill-ring): Fix the case of 'M-y M-p' (bug#48478)
Date: Thu, 3 Jun 2021 16:54:48 -0400 (EDT)

branch: master
commit 15c57fc4cc031cc6aca7eabd74706538fd6bfa22
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/simple.el (read-from-kill-ring): Fix the case of 'M-y M-p' 
(bug#48478)
    
    Don't use offsets for read-from-kill-ring-history when 
kill-ring-yank-pointer
    points to the last element of kill-ring.
---
 lisp/simple.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 6d216f7..a0adaff 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5742,7 +5742,8 @@ PROMPT is a string to prompt with."
            (complete-with-action action completions string pred)))
        nil nil nil
        (if history-pos
-           (cons 'read-from-kill-ring-history (1+ history-pos))
+           (cons 'read-from-kill-ring-history
+                 (if (zerop history-pos) history-pos (1+ history-pos)))
          'read-from-kill-ring-history)))))
 
 (defcustom yank-from-kill-ring-rotate t



reply via email to

[Prev in Thread] Current Thread [Next in Thread]