Fix switching bug at init
This commit is contained in:
30
eyebrowse.el
30
eyebrowse.el
@ -252,13 +252,14 @@ If `eyebrowse-wrap-around-p' is t, this will switch from the last
|
|||||||
to the first one."
|
to the first one."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((match (assq eyebrowse-current-slot eyebrowse-window-configs))
|
(let* ((match (assq eyebrowse-current-slot eyebrowse-window-configs))
|
||||||
(index (-elem-index match eyebrowse-window-configs))
|
(index (-elem-index match eyebrowse-window-configs)))
|
||||||
(next-index (car (nth (1+ index) eyebrowse-window-configs))))
|
(when index
|
||||||
(if (< (1+ index) (length eyebrowse-window-configs))
|
(if (< (1+ index) (length eyebrowse-window-configs))
|
||||||
(eyebrowse-switch-to-window-config next-index)
|
(eyebrowse-switch-to-window-config
|
||||||
(when eyebrowse-wrap-around-p
|
(car (nth (1+ index) eyebrowse-window-configs)))
|
||||||
(eyebrowse-switch-to-window-config
|
(when eyebrowse-wrap-around-p
|
||||||
(caar eyebrowse-window-configs))))))
|
(eyebrowse-switch-to-window-config
|
||||||
|
(caar eyebrowse-window-configs)))))))
|
||||||
|
|
||||||
(defun eyebrowse-prev-window-config ()
|
(defun eyebrowse-prev-window-config ()
|
||||||
"Switch to the previous available window config.
|
"Switch to the previous available window config.
|
||||||
@ -266,13 +267,14 @@ If `eyebrowse-wrap-around-p' is t, this will switch from the
|
|||||||
first to the last one."
|
first to the last one."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((match (assq eyebrowse-current-slot eyebrowse-window-configs))
|
(let* ((match (assq eyebrowse-current-slot eyebrowse-window-configs))
|
||||||
(index (-elem-index match eyebrowse-window-configs))
|
(index (-elem-index match eyebrowse-window-configs)))
|
||||||
(prev-index (car (nth (1- index) eyebrowse-window-configs))))
|
(when index
|
||||||
(if (> index 0)
|
(if (> index 0)
|
||||||
(eyebrowse-switch-to-window-config prev-index)
|
(eyebrowse-switch-to-window-config
|
||||||
(when eyebrowse-wrap-around-p
|
(car (nth (1- index) eyebrowse-window-configs)))
|
||||||
(eyebrowse-switch-to-window-config
|
(when eyebrowse-wrap-around-p
|
||||||
(caar (last eyebrowse-window-configs)))))))
|
(eyebrowse-switch-to-window-config
|
||||||
|
(caar (last eyebrowse-window-configs))))))))
|
||||||
|
|
||||||
(defun eyebrowse-last-window-config ()
|
(defun eyebrowse-last-window-config ()
|
||||||
"Switch to the last window config."
|
"Switch to the last window config."
|
||||||
|
|||||||
Reference in New Issue
Block a user