clear numbers-table only on update (and now also when 'frame-local)

This commit is contained in:
deb0ch 2017-04-16 13:27:47 +02:00
parent 6f52356657
commit 4bee4987bc

View file

@ -394,6 +394,7 @@ POSITION: position in the mode-line."
(setq winum--window-count (length windows) (setq winum--window-count (length windows)
winum--remaining (winum--available-numbers)) winum--remaining (winum--available-numbers))
(winum--set-window-vector (make-vector (1+ winum--window-count) nil)) (winum--set-window-vector (make-vector (1+ winum--window-count) nil))
(clrhash (winum--get-numbers-table))
(when winum-assign-func (when winum-assign-func
(mapc (lambda (w) (mapc (lambda (w)
(with-selected-window w (with-selected-window w
@ -482,8 +483,7 @@ windows, however a higher number can be reserved by the user-defined
(cons window-vector (cons window-vector
(make-hash-table :size winum--window-count)) (make-hash-table :size winum--window-count))
winum--frames-table) winum--frames-table)
(setq winum--window-vector window-vector) (setq winum--window-vector window-vector)))
(clrhash winum--numbers-table)))
(defun winum--get-window-vector () (defun winum--get-window-vector ()
"Return the window vector used to get a window given a number. "Return the window vector used to get a window given a number.