mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 10:31:23 -08:00
fix: off by one when switching workspaces
This commit is contained in:
parent
f9664ae058
commit
16da9ee1d6
1 changed files with 2 additions and 2 deletions
|
|
@ -30,10 +30,10 @@
|
||||||
(evil-define-command +workspace:switch-next (&optional count)
|
(evil-define-command +workspace:switch-next (&optional count)
|
||||||
"Switch to next workspace. If COUNT, switch to COUNT-th workspace."
|
"Switch to next workspace. If COUNT, switch to COUNT-th workspace."
|
||||||
(interactive "<c>")
|
(interactive "<c>")
|
||||||
(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)
|
;;;###autoload (autoload '+workspace:switch-previous "ui/workspaces/autoload/evil" nil t)
|
||||||
(evil-define-command +workspace:switch-previous (&optional count)
|
(evil-define-command +workspace:switch-previous (&optional count)
|
||||||
"Switch to previous workspace. If COUNT, switch to COUNT-th workspace."
|
"Switch to previous workspace. If COUNT, switch to COUNT-th workspace."
|
||||||
(interactive "<c>")
|
(interactive "<c>")
|
||||||
(if count (+workspace/switch-to count) (+workspace/cycle -1)))
|
(if count (+workspace/switch-to (max (1- count) 0)) (+workspace/cycle -1)))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue