File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -552,10 +552,24 @@ This vector is not stored the same way depending on the value of `winum-scope'."
552
552
This hashtable is not stored the same way depending on the value of
553
553
`winum-scope' "
554
554
(winum--check-for-scope-change)
555
+ (winum--check-frames-table)
555
556
(if (eq winum-scope 'frame-local )
556
557
(cdr (gethash (selected-frame ) winum--frames-table))
557
558
winum--numbers-table))
558
559
560
+ (defun winum--check-frames-table ()
561
+ " Make sure `winum--frames-table' exists and is correctly equipped.
562
+ Verifies 2 things (when `winum-scope' is frame local):
563
+ * When `winum-scope' is frame-local for the first time it may be necessary to
564
+ instantiate `winum--frames-table' .
565
+ * A table entry for the current frame must be made when the frame has just
566
+ been created."
567
+ (when (eq winum-scope 'frame-local )
568
+ (unless winum--frames-table
569
+ (setq winum--frames-table (make-hash-table :size winum--max-frames)))
570
+ (unless (gethash (selected-frame ) winum--frames-table)
571
+ (winum--update))))
572
+
559
573
(defun winum--available-numbers ()
560
574
" Return a list of numbers from 1 to `winum--window-count' .
561
575
0 is is not part of the list as its assignment is either manual
You can’t perform that action at this time.
0 commit comments