about summary refs log tree commit diff
path: root/users/wpcarro/emacs/.emacs.d/wpc/cycle.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2021-12-24T16·47-0500
committerclbot <clbot@tvl.fyi>2021-12-24T16·54+0000
commit51594136816e52ffd27111d96463685a37b52792 (patch)
tree5953363fdec6b8983ad0230dba6706c419333dfc /users/wpcarro/emacs/.emacs.d/wpc/cycle.el
parent59755aa1ea16459c85c3086d51b3467f8948a705 (diff)
fix(wpcarro/emacs): Debug vterm-mgt.el r/3348
TL;DR:
- vterm-mgt-repopulate-cycle -> vterm-mgt-reconcile-state
- call vterm-mgt-reconcile-state everywhere to ensure state is consistent
- prevent vterm from swalling EXWM KBD (C-S-f)
- support vterm-mgt-select
- prevent type error in cycle-append
- pass t to (vterm t) to ensure it isn't a find-or-create

Change-Id: I0f6d20b8d4b7533c7f56baf796ca3467a85ec770
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4563
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/wpcarro/emacs/.emacs.d/wpc/cycle.el')
-rw-r--r--users/wpcarro/emacs/.emacs.d/wpc/cycle.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/users/wpcarro/emacs/.emacs.d/wpc/cycle.el b/users/wpcarro/emacs/.emacs.d/wpc/cycle.el
index e683f3c201..a1853ece14 100644
--- a/users/wpcarro/emacs/.emacs.d/wpc/cycle.el
+++ b/users/wpcarro/emacs/.emacs.d/wpc/cycle.el
@@ -168,7 +168,8 @@ If there is no currently focused item, add X to the beginning of XS."
       (if curr-i
           (progn
             (struct-set! cycle xs (-insert-at curr-i x (cycle-xs xs)) xs)
-            (when (>= prev-i curr-i) (struct-set! cycle previous-index (1+ prev-i) xs))
+            (when (and prev-i (>= prev-i curr-i))
+              (struct-set! cycle previous-index (1+ prev-i) xs))
             (when curr-i (struct-set! cycle current-index (1+ curr-i) xs)))
         (progn
           (struct-set! cycle xs (cons x (cycle-xs xs)) xs)