diff --git a/eyebrowse.el b/eyebrowse.el index f80f591..889daf6 100644 --- a/eyebrowse.el +++ b/eyebrowse.el @@ -405,7 +405,7 @@ window config COUNT." (index (-elem-index match window-configs))) (if count (eyebrowse-switch-to-window-config count) - (when index + (when (and index (> (length window-configs) 1)) (if (< (1+ index) (length window-configs)) (eyebrowse-switch-to-window-config (car (nth (1+ index) window-configs))) @@ -427,7 +427,7 @@ switch COUNT window configs backwards and always wrap around." (eyebrowse-prev-window-config (when (> count 1) (eyebrowse-prev-window-config (1- count))))) - (when index + (when (and index (> (length window-configs) 1)) (if (> index 0) (eyebrowse-switch-to-window-config (car (nth (1- index) window-configs)))