mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-17 11:32:59 -07:00
Fix duplicate inputs in 'comint-read-input-ring'
* lisp/comint.el (comint-read-input-ring): Fix the index of the last input in the ring. (Bug#79329)
This commit is contained in:
parent
c374bb50da
commit
fb969ab174
1 changed files with 3 additions and 2 deletions
|
|
@ -1090,8 +1090,9 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'."
|
|||
(when (and (not (string-match history-ignore history))
|
||||
(or (null ignoredups)
|
||||
(ring-empty-p ring)
|
||||
(not (string-equal (ring-ref ring 0)
|
||||
history))))
|
||||
(not (string-equal
|
||||
(ring-ref ring (1- (ring-length ring)))
|
||||
history))))
|
||||
(when (= count ring-size)
|
||||
(ring-extend ring (min (- ring-max-size ring-size)
|
||||
ring-size))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue