Fix handling of non-nil 'dired-movement-style'
* lisp/dired.el (dired--move-to-next-line): Treat any non-nil value of 'dired-movement-style' except 'cycle' as 'bounded'. (dired-movement-style): Mention this in the doc string. (Bug#71770)
This commit is contained in:
parent
b1e9b6fd67
commit
ced33bc239
1 changed files with 3 additions and 2 deletions
|
@ -511,7 +511,8 @@ Possible non-nil values:
|
||||||
* `cycle': when moving from the last/first visible line, cycle back
|
* `cycle': when moving from the last/first visible line, cycle back
|
||||||
to the first/last visible line.
|
to the first/last visible line.
|
||||||
* `bounded': don't move up/down if the current line is the
|
* `bounded': don't move up/down if the current line is the
|
||||||
first/last visible line."
|
first/last visible line.
|
||||||
|
Any other non-nil value is treated as `bounded'."
|
||||||
:type '(choice (const :tag "Move to any line" nil)
|
:type '(choice (const :tag "Move to any line" nil)
|
||||||
(const :tag "Cycle through non-empty lines" cycle)
|
(const :tag "Cycle through non-empty lines" cycle)
|
||||||
(const :tag "Stop on last/first non-empty line" bounded))
|
(const :tag "Stop on last/first non-empty line" bounded))
|
||||||
|
@ -2886,7 +2887,7 @@ is controlled by `dired-movement-style'."
|
||||||
(point-max))))
|
(point-max))))
|
||||||
(setq wrapped t))
|
(setq wrapped t))
|
||||||
;; `bounded': go back to the last non-empty line.
|
;; `bounded': go back to the last non-empty line.
|
||||||
((eq dired-movement-style 'bounded)
|
(dired-movement-style ; Either 'bounded or anything else non-nil.
|
||||||
(while (and (dired-between-files) (not (zerop arg)))
|
(while (and (dired-between-files) (not (zerop arg)))
|
||||||
(funcall jumpfun (- moving-down))
|
(funcall jumpfun (- moving-down))
|
||||||
;; Point not moving means infinite loop.
|
;; Point not moving means infinite loop.
|
||||||
|
|
Loading…
Add table
Reference in a new issue