Shorten validity-check.

This commit is contained in:
tastytea 2020-03-08 05:48:48 +01:00
parent 046b1e897e
commit c90d005c54
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 4 additions and 5 deletions

View File

@ -173,11 +173,10 @@ Works on markers and file-queries."
(when (or (> index (- (length register-list) 1)) (< index 0)) (when (or (> index (- (length register-list) 1)) (< index 0))
(setq index nil)) (setq index nil))
(if next (if next
(progn (when (or (eq index nil) (eq index (length register-list)))
(if (or (eq index nil) (eq index (length register-list))) (setq index 0))
(setq index 0))) (when (eq index nil)
(if (or (eq index nil)) (setq index (- (length register-list) 1))))
(setq index (- (length register-list) 1))))
(register-to-point (car (nth index register-list))) (register-to-point (car (nth index register-list)))
(register-quicknav--last-register (nth index register-list))) (register-quicknav--last-register (nth index register-list)))
(register-to-point (car (car register-list))) (register-to-point (car (car register-list)))