mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-09 09:16:02 -08:00
Fix off-by-one inconsistency of 'M-y C-y' (bug#48478).
* lisp/simple.el (read-from-kill-ring): Increment kill-ring-yank-pointer by 1. (yank-from-kill-ring): Don't increment kill-ring-yank-pointer by 1.
This commit is contained in:
parent
1866e66a73
commit
ef7a6eec20
1 changed files with 2 additions and 2 deletions
|
|
@ -5734,7 +5734,7 @@ 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 history-pos)
|
||||
(cons 'read-from-kill-ring-history (1+ history-pos))
|
||||
'read-from-kill-ring-history)))))
|
||||
|
||||
(defcustom yank-from-kill-ring-rotate t
|
||||
|
|
@ -5773,7 +5773,7 @@ When called from Lisp, insert STRING like `insert-for-yank' does."
|
|||
(when yank-from-kill-ring-rotate
|
||||
(let ((pos (seq-position kill-ring string)))
|
||||
(setq kill-ring-yank-pointer
|
||||
(or (and pos (nthcdr (1+ pos) kill-ring))
|
||||
(or (and pos (nthcdr pos kill-ring))
|
||||
kill-ring))))
|
||||
(if (consp arg)
|
||||
;; Swap point and mark like in `yank' and `yank-pop'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue