* lisp/simple.el (previous-line-or-history-element): Fix off-by-one error.
(bug#79746)
This commit is contained in:
parent
dd9d1df4fa
commit
fae5ced1ac
1 changed files with 6 additions and 6 deletions
|
|
@ -3191,12 +3191,12 @@ previous element of the minibuffer history in the minibuffer."
|
|||
;; Avoid moving point to the prompt
|
||||
(when (< (point) (minibuffer-prompt-end))
|
||||
;; If there is minibuffer contents on the same line
|
||||
(if (<= (minibuffer-prompt-end)
|
||||
(save-excursion
|
||||
(if (or truncate-lines (not line-move-visual))
|
||||
(end-of-line)
|
||||
(end-of-visual-line))
|
||||
(point)))
|
||||
(if (< (minibuffer-prompt-end)
|
||||
(save-excursion
|
||||
(if (or truncate-lines (not line-move-visual))
|
||||
(end-of-line)
|
||||
(end-of-visual-line))
|
||||
(point)))
|
||||
;; Move to the beginning of minibuffer contents
|
||||
(goto-char (minibuffer-prompt-end))
|
||||
;; Otherwise, go to the previous history element
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue