diff --git a/modules/ui/workspaces/autoload/evil.el b/modules/ui/workspaces/autoload/evil.el index bb904e540..2e79a41af 100644 --- a/modules/ui/workspaces/autoload/evil.el +++ b/modules/ui/workspaces/autoload/evil.el @@ -30,10 +30,10 @@ (evil-define-command +workspace:switch-next (&optional count) "Switch to next workspace. If COUNT, switch to COUNT-th workspace." (interactive "") - (if count (+workspace/switch-to count) (+workspace/cycle +1))) + (if count (+workspace/switch-to (max (1- count) 0)) (+workspace/cycle +1))) ;;;###autoload (autoload '+workspace:switch-previous "ui/workspaces/autoload/evil" nil t) (evil-define-command +workspace:switch-previous (&optional count) "Switch to previous workspace. If COUNT, switch to COUNT-th workspace." (interactive "") - (if count (+workspace/switch-to count) (+workspace/cycle -1))) + (if count (+workspace/switch-to (max (1- count) 0)) (+workspace/cycle -1)))