Don't use offsets for read-from-kill-ring-history when kill-ring-yank-pointer
points to the last element of kill-ring.
(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